commit: 723e96f762eeaec837d88e20a1ba22de597f5658 Author: Aric Belsito <lluixhi <AT> gmail <DOT> com> AuthorDate: Fri Feb 3 00:47:06 2017 +0000 Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com> CommitDate: Fri Feb 3 00:47:06 2017 +0000 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=723e96f7
net-libs/webkit-gtk: add 2.14.3 net-libs/webkit-gtk/Manifest | 6 + .../webkit-gtk/files/webkit-gtk-2.14.3-musl.patch | 82 ++++++ .../files/webkit-gtk-2.8.5-fix-alpha-build.patch | 22 ++ .../files/webkit-gtk-2.8.5-fix-ia64-build.patch | 21 ++ ...kit-gtk-2.8.5-webkit2gtkinjectedbundle-j1.patch | 22 ++ net-libs/webkit-gtk/webkit-gtk-2.14.3.ebuild | 293 +++++++++++++++++++++ 6 files changed, 446 insertions(+) diff --git a/net-libs/webkit-gtk/Manifest b/net-libs/webkit-gtk/Manifest index 989b7e1..4eae739 100644 --- a/net-libs/webkit-gtk/Manifest +++ b/net-libs/webkit-gtk/Manifest @@ -1,5 +1,6 @@ AUX webkit-gtk-1.11.90-gtk-docize-fix.patch 426 SHA256 20d26df63afbdbf829974597bf53a9657007e9940431ffa0020f1d5fa5d22b4f SHA512 e35cc255e36742519b4f26b60d8e704eb3e0e66e8e13599cadae6fe445a3a87a2c6c65b6746c4d39f1ab11e7eb79b0f63a5fc9d5af5d7fa8907b224b852e3b32 WHIRLPOOL a91ba71b8b4fa2f1ff5de1633fa477bc1f45de37f3bbd212af1ecf4b6298c5454c199cd89f6602854978d4ae6a551316eb96c4f90c82a0c07018e94ac3025e43 AUX webkit-gtk-1.6.1-darwin-quartz.patch 1516 SHA256 34ad751c33e868d85b41e06ecbd085b61a81c42bd52063bada52bc59b9e05a23 SHA512 ca8c80d06aa93c07d658ebf3433f5fdee9225616740a075f5606df87e3b90a83b2c492777a8e30255cdd4f11f889be789544ac1fc4a39056e1929a72720347ea WHIRLPOOL 558250f3cf6de4d511a26afb0aeacc04b7049b3d0499362d320c035acac20932d7c16f6ff99d83833498296e3a21b5e2bab985b1ee5fca709754b582195a0fd1 +AUX webkit-gtk-2.14.3-musl.patch 4111 SHA256 cc371f6dd10f489169eaa5b0ef3b197eae7a0f7d349aca86f830dd45f39473af SHA512 eb47b3c9d58bfa121acf83f2f58e819e2e2a2198c58ff926a1d3db8ee1c5ddbcbaad5c06d113cec1c20f286877823edcd52cc0caf3993a8b89a6fb5277f0a387 WHIRLPOOL 486613fe49588ed3019298eebe66a94a6e823e1719ff602dedc330222a931350a605dc64013f3a0244d661d335699a5836cf4083c93b5723a6cb457845e5ca04 AUX webkit-gtk-2.2.5-hppa-platform.patch 530 SHA256 9a2b8311a89aa3500d19d2425c0f12f67c1457c67ecaa322511170461c4c6be7 SHA512 168d4f8acddf4a5fa6ddc3661ef3ec344824c854db036b279d38d526b6025cfbb8bbd15bc64ddd846876749823796ca7d05e4083cf35a744d46b00cfd5179ae1 WHIRLPOOL 5fc8070bf07eef199578db5802452b4443ee3a00b555325b430a3cfd923a0cbb827497907462cb224b07f2f1713d65a26af4adf24b3dca59cb9040dbd6227f92 AUX webkit-gtk-2.2.5-ia64-platform.patch 331 SHA256 1ac5327f4f190bc4cbee9e62d4a2805879bbffd914ba75be17afd1aa245e6693 SHA512 dae3cde801d2d29c61abb64c00bf33ac1f7080dd2085cc9a1520c8606ef65538ccee9b1e4c4c16a3dba551acd035542f80b6e808ae5090bb883c85ecfa7ac36e WHIRLPOOL d9ca8172f685f515bb22a38d269e73f1e0fdcbf487bb83557f41649cd9ff5883d1fe0827aef3c753d975895252db3e3fa5eef3f72b43a6557492effd5db10072 AUX webkit-gtk-2.4.1-ia64-malloc.patch 807 SHA256 8e01dee48af7e8e0d24729dd9b99e88b47125b5f91d07df29d579785e60d398d SHA512 d9e7a792861ff30137072eba6b5b80e7b37e47e7302bf1cd56027b5c30aea3fd215891f6272d85b80e98c826b3216d0701fe92f06b76e7d1fb860028d7a701c0 WHIRLPOOL 7cf769d9752cf800f72e76233ef299e2da8c13f427cd8d312d47d76282091f06ec32a618dda9d0bacedbc5dcf8aa4289ce9ce089cdbb90be28deeb75e449a925 @@ -10,7 +11,12 @@ AUX webkit-gtk-2.4.7-disable-webgl.patch 442 SHA256 6fb78d5f94806ddb976ceb076e62 AUX webkit-gtk-2.4.9-gcc-6.patch 1890 SHA256 d0d82c1a1e955e03dd7667e351d99da485d7297acf378e715820202e48d4088e SHA512 cfcfe95b08d503456b1ea6e1770dd4ca4cd61f613ef76962cd01bc4826fbb25aed04834f820da987fd1c80941b90da73086ec5e7e19285e54082f5e90598fd9c WHIRLPOOL 1ebbeb9564978b3ddf4488c9fe72113da0ff10a0ba8c3bcd418b913a936ebe09da907e86714b7419f2746af1648ab786850559c4a5c6a0f1b51ed98e9aab0334 AUX webkit-gtk-2.4.9-remove-disallow_ctypes_h-braindead.patch 733 SHA256 d447d71943cacdec166f0a65f34258494f70719ba9cd951d5b512902e20200d0 SHA512 580531428c0498e996de358a20a499f36edaaa98a108088c5dde428a997a61e5a55293cf855d652655c193cd5cda8e25723cac360d3983fcd1fbce35aa9b41a0 WHIRLPOOL b68bc94045ef46f5959146b6d14e2e39c9a1e3c7a39a9e7164ece4db1d1fc9f3c846b26af5e7b2b81db5ee82913b4018097367c6843a8b41758316cd27371bcc AUX webkit-gtk-2.4.9-remove-execinfo_h.patch 1374 SHA256 9a6cea9456c7d38b280be1d4f29417e3d4ebd619e183535368175c473485c2dd SHA512 f4a0647530f29bed5fdbf0fcec5d52c6064a13c00715fb6fb490490dee29dac87bb2b1d9ab35ce2bf7b9eb2da262cf5bb07b7c84f82f84cfab784a61f163811e WHIRLPOOL f18be67ef26051ebe271481c3444761c604a40fcda9679f3778cccbc3513f8501a6c3ea9b43fa1b3c3eaa04ca08585e62d8b3a27185358dc69c612ef8eab8364 +AUX webkit-gtk-2.8.5-fix-alpha-build.patch 914 SHA256 aa6617505fe9342153ba9442ea109d880ca6c3315777c57ab599f67515e2a9f7 SHA512 c3599c21dbcc709cf1bbc56eafdff8f8d30d65732fff73e601a828b397523d9a0cec96a4e7940ad1b4b3d9b4711f6d5f2935dcd34cac9adec63b73401638fd5e WHIRLPOOL 68a39ccf49e7719393f14cd5d53497148527bd697b010378bdec4cdefb21c5fc7ce5081ce10b412c61390a82e45fa44d9d34aa7f223c51ad15eb1d0288ccbe60 +AUX webkit-gtk-2.8.5-fix-ia64-build.patch 663 SHA256 d076739707de117fbc9aebc684c4a43024e1673e4c30fdfa3be529331f0c1f78 SHA512 ce8dbe7f2bacfc6d1ad70d39d80447ab90e6daf63bc1dc4a49c406255f76eff090f79e6076ebc349d69193b72a821fa6591692cf74a28e529f8db95cf86358fc WHIRLPOOL adf8e11ee3060bcba606cf17673d06d9c98034a71f6a7406832fabf461c4697abcd0c3d4cdb8d8298caf221c797e0732a9f865d761fcf05753a1dfd96dfd3d82 +AUX webkit-gtk-2.8.5-webkit2gtkinjectedbundle-j1.patch 880 SHA256 411a4238c2e863b60744287ad645f1e3e0cddd33e895f4dfb1e1c5cfd9f48765 SHA512 7150400387f5edd3a647359ef1d864634c25d0a7dad043c1b0734fb44d133f59bbc0ce065e59bc3abab0082272ac54c1b40752e06041e5e36c11f502a9734a62 WHIRLPOOL 470ea2f6228878ddae55cec72b667f14f56d5f7017ea1cce123dcc5da41dd3fd589214b722e5a85bd81f2a14445a759c55366826b82e3801d8e40ef2ba9c6826 +DIST webkitgtk-2.14.3.tar.xz 13962776 SHA256 0bead450a4c92024f09008725bb3e8c3830a32c7e2983d566368c4fede9e106c SHA512 b530b84f238230f29462ef599ffd1b9a9458690ba03a78d09126bf4c4ab37b4dfb477da7c364d2446cc259720ff4743112672ebf7888b8e3ff2c8fc1271fda57 WHIRLPOOL 560b4c818ca6271eca72a31c65c11b0c42269a125e68dfac7932f40e6d108cff325e5340d6040889f429b0e6b978a2a6279432f23a0c8956af02e6ece8a61ff8 DIST webkitgtk-2.4.11.tar.xz 9869100 SHA256 588aea051bfbacced27fdfe0335a957dca839ebe36aa548df39c7bbafdb65bf7 SHA512 2e2cf01a52b8593765a0a3c2d7f0ad306121660019eb402226bd2826c7d4666dab4e91ca6ccbd29abe0ad3993549f256ed1ab88de22e9c8516d5f40a4edd6bfb WHIRLPOOL de86c4abfb22aacbf62163d0398158931c9cf6ab628547d3b30e613f0505d67c85c3200f7db96500e7c2b35f640cdaa7f501346fc13f492c9439dff4056849a3 +EBUILD webkit-gtk-2.14.3.ebuild 8558 SHA256 948c02462aee8e42db2d040c3e3c47079538935e99274e588064b6484b24c398 SHA512 0918411af48f6332925a3b2c3470273d7f6d586db94a065a34a899ed25635069c4559bacf3297d777779ed795dcb4360fa75f56ae7fcb2abecb0322e141192ae WHIRLPOOL 8df6af74418c8b595194dff849087bd8747062c586ace1ca76b1525d002bcc7c5fa63275bb536af9d75e405fcb613583b5b502e684b45bc41d18a9bf7fe4044c EBUILD webkit-gtk-2.4.11-r1.ebuild 9123 SHA256 6fc62f471fe028d8e0a2fe0a130dc53833f62c49ab7136dbc446dd290b4b71ce SHA512 5e12f7febbd297859e6d9fa709efbdfe440b5d7900d70ee1e81479313bfabd5583b6c1a68d912748df02af2d1f430fac63382ecb92a9986cbb9841602294b5c8 WHIRLPOOL f9d46ac0776142733ee7d2fe5907acaa265198f6bc1334e74c8c6f7fecece8545de9f620d15d00b7f8aa3225e0d325ace4af58360145d3f9f8bd20a4ed74a067 EBUILD webkit-gtk-2.4.11-r200.ebuild 8530 SHA256 e579be98b8fba274c974019ac867e2a2fdefba5d4b7e4419c324f1eae74b7a5d SHA512 dbf7e7e1dffc157be18602e0e1bda57297f30c5a1f00862736067d6fee8573c1711f027bab07a698a1cd382a6f6d825327deed7274930a098f416e77c8d05371 WHIRLPOOL ec612bb5db541cdd866227f09281f63dbf9e157eb485c8ce8e87f9664ef3213750958f0ba13f3a87cfe641b3c6f1972ea15a9955d2293e101cf8b466dea10aad MISC metadata.xml 634 SHA256 48f0a29437afb03701f60011476eb2ad74683d918b69c6963e16f92b763bb0de SHA512 36bcb7965d4bf4b61d9399c794d4f4a438152bf6338ef68cfd6a04f8c94351b35f1cb09172fb4eee4db9b072e0984420ee976031e2c27963fe0390e079494ba8 WHIRLPOOL e14b1f0070ff39f026b1c406718d68f2ccffe4c4db7bf5afe16c658cc1837cb3b29820868b2e9617beb37442eab7ac2f9d8340f55a763bc5ee8ebe1a2065c694 diff --git a/net-libs/webkit-gtk/files/webkit-gtk-2.14.3-musl.patch b/net-libs/webkit-gtk/files/webkit-gtk-2.14.3-musl.patch new file mode 100644 index 0000000..f5b40f9 --- /dev/null +++ b/net-libs/webkit-gtk/files/webkit-gtk-2.14.3-musl.patch @@ -0,0 +1,82 @@ +diff -Naur webkitgtk-2.14.3.orig/Source/JavaScriptCore/heap/MachineStackMarker.cpp webkitgtk-2.14.3/Source/JavaScriptCore/heap/MachineStackMarker.cpp +--- webkitgtk-2.14.3.orig/Source/JavaScriptCore/heap/MachineStackMarker.cpp 2017-01-21 14:57:58.821113862 -0800 ++++ webkitgtk-2.14.3/Source/JavaScriptCore/heap/MachineStackMarker.cpp 2017-01-21 14:59:46.889444106 -0800 +@@ -549,7 +549,7 @@ + #error Unknown Architecture + #endif + +-#elif defined(__GLIBC__) && ENABLE(JIT) ++#elif OS(LINUX) && ENABLE(JIT) + + #if CPU(X86) + return reinterpret_cast<void*>((uintptr_t) regs.machineContext.gregs[REG_ESP]); +@@ -648,9 +648,8 @@ + #error Unknown Architecture + #endif + +-#elif defined(__GLIBC__) ++#elif OS(LINUX) + +-// The following sequence depends on glibc's sys/ucontext.h. + #if CPU(X86) + return reinterpret_cast<void*>((uintptr_t) regs.machineContext.gregs[REG_EBP]); + #elif CPU(X86_64) +@@ -730,9 +729,8 @@ + #error Unknown Architecture + #endif + +-#elif defined(__GLIBC__) ++#elif OS(LINUX) + +-// The following sequence depends on glibc's sys/ucontext.h. + #if CPU(X86) + return reinterpret_cast<void*>((uintptr_t) regs.machineContext.gregs[REG_EIP]); + #elif CPU(X86_64) +@@ -821,9 +819,8 @@ + #error Unknown Architecture + #endif + +-#elif defined(__GLIBC__) ++#elif OS(LINUX) + +-// The following sequence depends on glibc's sys/ucontext.h. + #if CPU(X86) + return reinterpret_cast<void*>((uintptr_t) regs.machineContext.gregs[REG_ESI]); + #elif CPU(X86_64) +diff -Naur webkitgtk-2.14.3.orig/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp webkitgtk-2.14.3/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp +--- webkitgtk-2.14.3.orig/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp 2017-01-21 14:57:58.933115241 -0800 ++++ webkitgtk-2.14.3/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp 2017-01-21 15:00:42.712131243 -0800 +@@ -49,7 +49,7 @@ + #include "ScriptCallStackFactory.h" + #include <wtf/Stopwatch.h> + +-#if OS(DARWIN) || (OS(LINUX) && !PLATFORM(GTK)) ++#if OS(DARWIN) || (OS(LINUX) && !PLATFORM(GTK) && defined(__GLIBC__) && !defined(__UCLIBC__)) + #include <cxxabi.h> + #include <dlfcn.h> + #include <execinfo.h> +@@ -187,7 +187,7 @@ + + void JSGlobalObjectInspectorController::appendAPIBacktrace(ScriptCallStack* callStack) + { +-#if OS(DARWIN) || (OS(LINUX) && !PLATFORM(GTK)) ++#if OS(DARWIN) || (OS(LINUX) && !PLATFORM(GTK) && defined(__GLIBC__) && !defined(__UCLIBC__)) + static const int framesToShow = 31; + static const int framesToSkip = 3; // WTFGetBacktrace, appendAPIBacktrace, reportAPIException. + +diff -Naur webkitgtk-2.14.3.orig/Source/JavaScriptCore/runtime/Options.h webkitgtk-2.14.3/Source/JavaScriptCore/runtime/Options.h +--- webkitgtk-2.14.3.orig/Source/JavaScriptCore/runtime/Options.h 2017-01-21 14:57:59.074116976 -0800 ++++ webkitgtk-2.14.3/Source/JavaScriptCore/runtime/Options.h 2017-01-21 15:01:36.813797195 -0800 +@@ -112,9 +112,9 @@ + \ + v(bool, reportMustSucceedExecutableAllocations, false, Normal, nullptr) \ + \ +- v(unsigned, maxPerThreadStackUsage, 4 * MB, Normal, "Max allowed stack usage by the VM") \ +- v(unsigned, softReservedZoneSize, 128 * KB, Normal, "A buffer greater than reservedZoneSize that reserves space for stringifying exceptions.") \ +- v(unsigned, reservedZoneSize, 64 * KB, Normal, "The amount of stack space we guarantee to our clients (and to interal VM code that does not call out to clients).") \ ++ v(unsigned, maxPerThreadStackUsage, 80 * KB, Normal, "Max allowed stack usage by the VM") \ ++ v(unsigned, softReservedZoneSize, 32 * KB, Normal, "A buffer greater than reservedZoneSize that reserves space for stringifying exceptions.") \ ++ v(unsigned, reservedZoneSize, 16 * KB, Normal, "The amount of stack space we guarantee to our clients (and to interal VM code that does not call out to clients).") \ + \ + v(bool, crashIfCantAllocateJITMemory, false, Normal, nullptr) \ + v(unsigned, jitMemoryReservationSize, 0, Normal, "Set this number to change the executable allocation size in ExecutableAllocatorFixedVMPool. (In bytes.)") \ diff --git a/net-libs/webkit-gtk/files/webkit-gtk-2.8.5-fix-alpha-build.patch b/net-libs/webkit-gtk/files/webkit-gtk-2.8.5-fix-alpha-build.patch new file mode 100644 index 0000000..3817bce --- /dev/null +++ b/net-libs/webkit-gtk/files/webkit-gtk-2.8.5-fix-alpha-build.patch @@ -0,0 +1,22 @@ +--- a/Source/JavaScriptCore/CMakeLists.txt.orig 2015-08-06 11:21:27.000000000 +0300 ++++ b/Source/JavaScriptCore/CMakeLists.txt 2015-10-29 17:47:10.535712494 +0300 +@@ -1146,6 +1146,7 @@ + list(APPEND JavaScriptCore_SOURCES ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.obj) + endif () + elseif (WTF_CPU_ARM64) ++elseif (WTF_CPU_ALPHA) + elseif (WTF_CPU_HPPA) + elseif (WTF_CPU_IA64) + elseif (WTF_CPU_PPC) + elseif (WTF_CPU_PPC64) +--- a/CMakeLists.txt.orig 2015-08-06 11:21:27.000000000 +0300 ++++ b/CMakeLists.txt 2015-10-29 01:23:37.416886279 +0300 +@@ -82,6 +82,8 @@ + set(WTF_CPU_ARM 1) + elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64") + set(WTF_CPU_ARM64 1) ++elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "alpha") ++ set(WTF_CPU_ALPHA 1) + elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^mips") + set(WTF_CPU_MIPS 1) + elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "sh4") diff --git a/net-libs/webkit-gtk/files/webkit-gtk-2.8.5-fix-ia64-build.patch b/net-libs/webkit-gtk/files/webkit-gtk-2.8.5-fix-ia64-build.patch new file mode 100644 index 0000000..6c88c49 --- /dev/null +++ b/net-libs/webkit-gtk/files/webkit-gtk-2.8.5-fix-ia64-build.patch @@ -0,0 +1,21 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -98,6 +98,8 @@ + set(WTF_CPU_PPC64LE 1) + elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "parisc*") + set(WTF_CPU_HPPA 1) ++elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "ia64") ++ set(WTF_CPU_IA64 1) + elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "s390") + set(WTF_CPU_S390 1) + elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "s390x") +--- a/Source/JavaScriptCore/CMakeLists.txt ++++ b/Source/JavaScriptCore/CMakeLists.txt +@@ -1147,6 +1147,7 @@ + endif () + elseif (WTF_CPU_ARM64) + elseif (WTF_CPU_HPPA) ++elseif (WTF_CPU_IA64) + elseif (WTF_CPU_PPC) + elseif (WTF_CPU_PPC64) + elseif (WTF_CPU_PPC64LE) diff --git a/net-libs/webkit-gtk/files/webkit-gtk-2.8.5-webkit2gtkinjectedbundle-j1.patch b/net-libs/webkit-gtk/files/webkit-gtk-2.8.5-webkit2gtkinjectedbundle-j1.patch new file mode 100644 index 0000000..49af448 --- /dev/null +++ b/net-libs/webkit-gtk/files/webkit-gtk-2.8.5-webkit2gtkinjectedbundle-j1.patch @@ -0,0 +1,22 @@ +2015-08-24 Alexandre Rostovtsev <tetrom...@gentoo.org> + + webkit2gtkinjectedbundle requires forwarding headers + https://bugs.webkit.org/show_bug.cgi?id=148379 + + Fixes GTK build with -j1 + + * PlatformGTK.cmake: + +Index: Source/WebKit2/PlatformGTK.cmake +=================================================================== +--- a/Source/WebKit2/PlatformGTK.cmake (revision 188859) ++++ b/Source/WebKit2/PlatformGTK.cmake (working copy) +@@ -860,7 +860,7 @@ include_directories( + ) + + add_library(webkit2gtkinjectedbundle MODULE "${WEBKIT2_DIR}/WebProcess/gtk/WebGtkInjectedBundleMain.cpp") +-add_dependencies(webkit2gtkinjectedbundle GObjectDOMBindings) ++add_dependencies(webkit2gtkinjectedbundle GObjectDOMBindings WebKit2-forwarding-headers) + add_webkit2_prefix_header(webkit2gtkinjectedbundle) + + # Add ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} to LD_LIBRARY_PATH diff --git a/net-libs/webkit-gtk/webkit-gtk-2.14.3.ebuild b/net-libs/webkit-gtk/webkit-gtk-2.14.3.ebuild new file mode 100644 index 0000000..e9c4089 --- /dev/null +++ b/net-libs/webkit-gtk/webkit-gtk-2.14.3.ebuild @@ -0,0 +1,293 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 +CMAKE_MAKEFILE_GENERATOR="ninja" +PYTHON_COMPAT=( python2_7 ) +USE_RUBY="ruby21 ruby22 ruby23 ruby24" + +inherit check-reqs cmake-utils eutils flag-o-matic gnome2 pax-utils python-any-r1 ruby-single toolchain-funcs versionator virtualx + +MY_P="webkitgtk-${PV}" +DESCRIPTION="Open source web browser engine" +HOMEPAGE="http://www.webkitgtk.org/" +SRC_URI="http://www.webkitgtk.org/releases/${MY_P}.tar.xz" + +LICENSE="LGPL-2+ BSD" +SLOT="4/37" # soname version of libwebkit2gtk-4.0 +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos" + +IUSE="aqua coverage doc +egl +geolocation gles2 gnome-keyring +gstreamer +introspection +jit libnotify nsplugin +opengl spell wayland +webgl X" + +# webgl needs gstreamer, bug #560612 +REQUIRED_USE=" + geolocation? ( introspection ) + gles2? ( egl ) + introspection? ( gstreamer ) + nsplugin? ( X ) + webgl? ( ^^ ( gles2 opengl ) ) + !webgl? ( ?? ( gles2 opengl ) ) + webgl? ( gstreamer ) + wayland? ( egl ) + || ( aqua wayland X ) +" + +# Tests fail to link for inexplicable reasons +# https://bugs.webkit.org/show_bug.cgi?id=148210 +RESTRICT="test" + +# use sqlite, svg by default +# Aqua support in gtk3 is untested +# Dependencies found at Source/cmake/OptionsGTK.cmake +RDEPEND=" + dev-db/sqlite:3= + >=dev-libs/glib-2.36:2 + dev-libs/hyphen + >=dev-libs/icu-3.8.1-r1:= + >=dev-libs/libxml2-2.8:2 + >=dev-libs/libxslt-1.1.7 + >=media-libs/fontconfig-2.8:1.0 + >=media-libs/freetype-2.4.2:2 + >=media-libs/harfbuzz-0.9.18:=[icu(+)] + >=media-libs/libpng-1.4:0= + media-libs/libwebp:= + >=net-libs/gnutls-3 + >=net-libs/libsoup-2.42:2.4[introspection?] + >=x11-libs/cairo-1.10.2:= + >=x11-libs/gtk+-3.14:3[introspection?] + >=x11-libs/pango-1.30.0 + virtual/jpeg:0= + + aqua? ( >=x11-libs/gtk+-3.14:3[aqua] ) + egl? ( media-libs/mesa[egl] ) + geolocation? ( >=app-misc/geoclue-2.1.5:2.0 ) + gles2? ( media-libs/mesa[gles2] ) + gnome-keyring? ( app-crypt/libsecret ) + gstreamer? ( + >=media-libs/gstreamer-1.2:1.0 + >=media-libs/gst-plugins-base-1.2:1.0 + >=media-libs/gst-plugins-bad-1.8:1.0[opengl?] ) + introspection? ( >=dev-libs/gobject-introspection-1.32.0:= ) + libnotify? ( x11-libs/libnotify ) + nsplugin? ( >=x11-libs/gtk+-2.24.10:2 ) + opengl? ( virtual/opengl + x11-libs/cairo[opengl] ) + spell? ( >=app-text/enchant-0.22:= ) + wayland? ( >=x11-libs/gtk+-3.14:3[wayland] ) + webgl? ( + x11-libs/cairo[opengl] + x11-libs/libXcomposite + x11-libs/libXdamage ) + X? ( + x11-libs/cairo[X] + >=x11-libs/gtk+-3.14:3[X] + x11-libs/libX11 + x11-libs/libXcomposite + x11-libs/libXrender + x11-libs/libXt ) +" + +# paxctl needed for bug #407085 +# Need real bison, not yacc +DEPEND="${RDEPEND} + ${PYTHON_DEPS} + ${RUBY_DEPS} + >=dev-lang/perl-5.10 + >=app-accessibility/at-spi2-core-2.5.3 + >=dev-libs/atk-2.8.0 + >=dev-util/gtk-doc-am-1.10 + >=dev-util/gperf-3.0.1 + >=sys-devel/bison-2.4.3 + >=sys-devel/flex-2.5.34 + || ( >=sys-devel/gcc-4.9 >=sys-devel/clang-3.3 ) + sys-devel/gettext + virtual/pkgconfig + + doc? ( >=dev-util/gtk-doc-1.10 ) + geolocation? ( dev-util/gdbus-codegen ) + introspection? ( jit? ( sys-apps/paxctl ) ) + test? ( + dev-lang/python:2.7 + dev-python/pygobject:3[python_targets_python2_7] + x11-themes/hicolor-icon-theme + jit? ( sys-apps/paxctl ) ) +" + +S="${WORKDIR}/${MY_P}" + +CHECKREQS_DISK_BUILD="18G" # and even this might not be enough, bug #417307 + +pkg_pretend() { + if [[ ${MERGE_TYPE} != "binary" ]] ; then + if is-flagq "-g*" && ! is-flagq "-g*0" ; then + einfo "Checking for sufficient disk space to build ${PN} with debugging CFLAGS" + check-reqs_pkg_pretend + fi + + if ! test-flag-CXX -std=c++11 ; then + die "You need at least GCC 4.9.x or Clang >= 3.3 for C++11-specific compiler flags" + fi + + if tc-is-gcc && [[ $(gcc-version) < 4.9 ]] ; then + die 'The active compiler needs to be gcc 4.9 (or newer)' + fi + fi +} + +pkg_setup() { + if [[ ${MERGE_TYPE} != "binary" ]] && is-flagq "-g*" && ! is-flagq "-g*0" ; then + check-reqs_pkg_setup + fi + + python-any-r1_pkg_setup +} + +src_prepare() { + # https://bugs.gentoo.org/show_bug.cgi?id=555504 + eapply "${FILESDIR}"/${PN}-2.8.5-fix-ia64-build.patch + + # https://bugs.gentoo.org/show_bug.cgi?id=564352 + # https://bugs.webkit.org/show_bug.cgi?id=167283 + eapply "${FILESDIR}"/${PN}-2.8.5-fix-alpha-build.patch + + # https://bugs.webkit.org/show_bug.cgi?id=148379 + eapply "${FILESDIR}"/${PN}-2.8.5-webkit2gtkinjectedbundle-j1.patch + + # musl and jit + eapply "${FILESDIR}"/${PN}-2.14.3-musl.patch + + gnome2_src_prepare +} + +src_configure() { + # Respect CC, otherwise fails on prefix #395875 + tc-export CC + + # Arches without JIT support also need this to really disable it in all places + use jit || append-cppflags -DENABLE_JIT=0 -DENABLE_YARR_JIT=0 -DENABLE_ASSEMBLER=0 + + # It does not compile on alpha without this in LDFLAGS + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648761 + use alpha && append-ldflags "-Wl,--no-relax" + + # ld segfaults on ia64 with LDFLAGS --as-needed, bug #555504 + use ia64 && append-ldflags "-Wl,--no-as-needed" + + # Sigbuses on SPARC with mcpu and co., bug #??? + use sparc && filter-flags "-mvis" + + # https://bugs.webkit.org/show_bug.cgi?id=42070 , #301634 + use ppc64 && append-flags "-mminimal-toc" + + # Try to use less memory, bug #469942 (see Fedora .spec for reference) + # --no-keep-memory doesn't work on ia64, bug #502492 + if ! use ia64; then + append-ldflags "-Wl,--no-keep-memory" + fi + + # We try to use gold when possible for this package +# if ! tc-ld-is-gold ; then +# append-ldflags "-Wl,--reduce-memory-overheads" +# fi + + # older glibc needs this for INTPTR_MAX, bug #533976 + if has_version "<sys-libs/glibc-2.18" ; then + append-cppflags "-D__STDC_LIMIT_MACROS" + fi + + # Multiple rendering bugs on youtube, github, etc without this, bug #547224 + append-flags $(test-flags -fno-strict-aliasing) + + local ruby_interpreter="" + + if has_version "virtual/rubygems[ruby_targets_ruby24]"; then + ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ruby24)" + elif has_version "virtual/rubygems[ruby_targets_ruby23]"; then + ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ruby23)" + elif has_version "virtual/rubygems[ruby_targets_ruby22]"; then + ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ruby22)" + else + ruby_interpreter="-DRUBY_EXECUTABLE=$(type -P ruby21)" + fi + + # TODO: Check Web Audio support + # should somehow let user select between them? + # + # FTL_JIT requires llvm + # + # opengl needs to be explicetly handled, bug #576634 + + local opengl_enabled + if use opengl || use gles2; then + opengl_enabled=ON + else + opengl_enabled=OFF + fi + + # support for webgl (aka 2d-canvas accelerating) + local canvas_enabled + if use webgl && ! use gles2 ; then + canvas_enabled=ON + else + canvas_enabled=OFF + fi + + local mycmakeargs=( + -DENABLE_QUARTZ_TARGET=$(usex aqua) + -DENABLE_API_TESTS=$(usex test) + -DENABLE_GTKDOC=$(usex doc) + -DENABLE_GEOLOCATION=$(usex geolocation) + $(cmake-utils_use_find_package gles2 OpenGLES2) + -DENABLE_GLES2=$(usex gles2) + -DENABLE_CREDENTIAL_STORAGE=$(usex gnome-keyring) + -DENABLE_VIDEO=$(usex gstreamer) + -DENABLE_WEB_AUDIO=$(usex gstreamer) + -DENABLE_INTROSPECTION=$(usex introspection) + -DENABLE_JIT=$(usex jit) + -DUSE_LIBNOTIFY=$(usex libnotify) + -DENABLE_PLUGIN_PROCESS_GTK2=$(usex nsplugin) + -DENABLE_SPELLCHECK=$(usex spell) + -DENABLE_WAYLAND_TARGET=$(usex wayland) + -DENABLE_WEBGL=$(usex webgl) + $(cmake-utils_use_find_package egl EGL) + $(cmake-utils_use_find_package opengl OpenGL) + -DENABLE_X11_TARGET=$(usex X) + -DENABLE_OPENGL=${opengl_enabled} + -DENABLE_ACCELERATED_2D_CANVAS=${canvas_enabled} + -DCMAKE_BUILD_TYPE=Release + -DPORT=GTK + ${ruby_interpreter} + ) + + # Allow it to use GOLD when possible as it has all the magic to + # detect when to use it and using gold for this concrete package has + # multiple advantages and is also the upstream default, bug #585788 +# if tc-ld-is-gold ; then +# mycmakeargs+=( -DUSE_LD_GOLD=ON ) +# else +# mycmakeargs+=( -DUSE_LD_GOLD=OFF ) +# fi + + cmake-utils_src_configure +} + +src_compile() { + cmake-utils_src_compile +} + +src_test() { + # Prevents test failures on PaX systems + use jit && pax-mark m $(list-paxables Programs/*[Tt]ests/*) # Programs/unittests/.libs/test* + + cmake-utils_src_test +} + +src_install() { + cmake-utils_src_install + + # Prevents crashes on PaX systems, bug #522808 + use jit && pax-mark m "${ED}usr/bin/jsc" "${ED}usr/libexec/webkit2gtk-4.0/WebKitWebProcess" + pax-mark m "${ED}usr/libexec/webkit2gtk-4.0/WebKitPluginProcess" + use nsplugin && pax-mark m "${ED}usr/libexec/webkit2gtk-4.0/WebKitPluginProcess"2 +}