diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4c162f7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +/webkitgtk-2.5.3.tar.xz +/webkitgtk-2.5.90.tar.xz +/webkitgtk-2.6.0.tar.xz +/webkitgtk-2.6.1.tar.xz +/webkitgtk-2.6.2.tar.xz +/webkitgtk-2.6.3.tar.xz +/webkitgtk-2.6.4.tar.xz +/webkitgtk-2.6.5.tar.xz +/webkitgtk-2.6.6.tar.xz diff --git a/dead.package b/dead.package deleted file mode 100644 index f75d3fb..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -Package was renamed to webkit2gtk3 diff --git a/sources b/sources new file mode 100644 index 0000000..c9b7a61 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +3c8c2ec4e4070aae12e96a9e25f83edc webkitgtk-2.6.6.tar.xz diff --git a/webkit-1.1.14-nspluginwrapper.patch b/webkit-1.1.14-nspluginwrapper.patch new file mode 100644 index 0000000..0d3aa27 --- /dev/null +++ b/webkit-1.1.14-nspluginwrapper.patch @@ -0,0 +1,12 @@ +--- webkit-1.1.17/Source/WebCore/plugins/PluginDatabase.cpp.old 2009-12-01 15:22:10.000000000 +0000 ++++ webkit-1.1.17/Source/WebCore/plugins/PluginDatabase.cpp 2009-12-01 15:22:21.000000000 +0000 +@@ -357,6 +357,9 @@ Vector PluginDatabase::defaultPl + paths.append("/usr/lib64/mozilla/plugins"); + paths.append("/usr/lib/nsbrowser/plugins"); + paths.append("/usr/lib64/nsbrowser/plugins"); ++ /* And for nspluginwrapper */ ++ paths.append("/usr/lib64/mozilla/plugins-wrapped"); ++ paths.append("/usr/lib/mozilla/plugins-wrapped"); + + String mozHome(getenv("MOZILLA_HOME")); + mozHome.append("/plugins"); diff --git a/webkitgtk-2.5.2-commit_align.patch b/webkitgtk-2.5.2-commit_align.patch new file mode 100644 index 0000000..fa75294 --- /dev/null +++ b/webkitgtk-2.5.2-commit_align.patch @@ -0,0 +1,35 @@ +diff -up webkitgtk-2.5.2/Source/JavaScriptCore/heap/CopiedBlock.h.ppc64_align webkitgtk-2.5.2/Source/JavaScriptCore/heap/CopiedBlock.h +--- webkitgtk-2.5.2/Source/JavaScriptCore/heap/CopiedBlock.h.ppc64_align 2014-07-08 06:17:14.000000000 -0600 ++++ webkitgtk-2.5.2/Source/JavaScriptCore/heap/CopiedBlock.h 2014-08-12 05:38:47.752283561 -0600 +@@ -81,7 +81,7 @@ public: + size_t size(); + size_t capacity(); + +- static const size_t blockSize = 32 * KB; ++ static const size_t blockSize = 64 * KB; + + bool hasWorkList(); + CopyWorkList& workList(); +diff -up webkitgtk-2.5.2/Source/JavaScriptCore/interpreter/JSStack.cpp.ppc64_align webkitgtk-2.5.2/Source/JavaScriptCore/interpreter/JSStack.cpp +--- webkitgtk-2.5.2/Source/JavaScriptCore/interpreter/JSStack.cpp.ppc64_align 2014-08-12 06:27:12.101177790 -0600 ++++ webkitgtk-2.5.2/Source/JavaScriptCore/interpreter/JSStack.cpp 2014-08-12 06:32:01.252063281 -0600 +@@ -58,7 +58,8 @@ JSStack::JSStack(VM& vm) + size_t capacity = Options::maxPerThreadStackUsage(); + ASSERT(capacity && isPageAligned(capacity)); + +- m_reservation = PageReservation::reserve(WTF::roundUpToMultipleOf(commitSize, capacity), OSAllocator::JSVMStackPages); ++ size_t commitsize = pageSize(); ++ m_reservation = PageReservation::reserve(WTF::roundUpToMultipleOf(commitsize, capacity), OSAllocator::JSVMStackPages); + setStackLimit(highAddress()); + m_commitTop = highAddress(); + +@@ -92,7 +93,8 @@ bool JSStack::growSlowCase(Register* new + // have it is still within our budget. If not, we'll fail to grow and + // return false. + ptrdiff_t delta = reinterpret_cast(m_commitTop) - reinterpret_cast(newTopOfStackWithReservedZone); +- delta = WTF::roundUpToMultipleOf(commitSize, delta); ++ size_t commitsize = pageSize(); ++ delta = WTF::roundUpToMultipleOf(commitsize, delta); + Register* newCommitTop = m_commitTop - (delta / sizeof(Register)); + if (newCommitTop < reservationTop()) + return false; diff --git a/webkitgtk-2.5.90-cloop_fix.patch b/webkitgtk-2.5.90-cloop_fix.patch new file mode 100644 index 0000000..c033641 --- /dev/null +++ b/webkitgtk-2.5.90-cloop_fix.patch @@ -0,0 +1,99 @@ +diff -up webkitgtk-2.5.90/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm.cloop_fix webkitgtk-2.5.90/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm +--- webkitgtk-2.5.90/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm.cloop_fix 2014-09-22 01:22:29.943407090 -0600 ++++ webkitgtk-2.5.90/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm 2014-09-22 01:20:25.463025643 -0600 +@@ -2094,7 +2094,7 @@ macro loadWithStructureCheck(operand, sl + end + + macro getProperty() +- loadisFromInstruction(6, t1) ++ loadpFromInstruction(6, t1) + loadPropertyAtVariableOffset(t1, t0, t2) + valueProfile(t2, 7, t0) + loadisFromInstruction(1, t0) +@@ -2111,7 +2111,7 @@ end + + macro getClosureVar() + loadp JSEnvironmentRecord::m_registers[t0], t0 +- loadisFromInstruction(6, t1) ++ loadpFromInstruction(6, t1) + loadq [t0, t1, 8], t0 + valueProfile(t0, 7, t1) + loadisFromInstruction(1, t1) +@@ -2168,7 +2168,7 @@ _llint_op_get_from_scope: + macro putProperty() + loadisFromInstruction(3, t1) + loadConstantOrVariable(t1, t2) +- loadisFromInstruction(6, t1) ++ loadpFromInstruction(6, t1) + storePropertyAtVariableOffset(t1, t0, t2) + end + +@@ -2185,7 +2185,7 @@ macro putClosureVar() + loadisFromInstruction(3, t1) + loadConstantOrVariable(t1, t2) + loadp JSEnvironmentRecord::m_registers[t0], t0 +- loadisFromInstruction(6, t1) ++ loadpFromInstruction(6, t1) + storeq t2, [t0, t1, 8] + end + +diff -up webkitgtk-2.5.90/Source/JavaScriptCore/bytecode/CodeBlock.cpp.cloop_fix webkitgtk-2.5.90/Source/JavaScriptCore/bytecode/CodeBlock.cpp +--- webkitgtk-2.5.90/Source/JavaScriptCore/bytecode/CodeBlock.cpp.cloop_fix 2014-09-17 06:31:08.000000000 -0600 ++++ webkitgtk-2.5.90/Source/JavaScriptCore/bytecode/CodeBlock.cpp 2014-09-24 06:00:21.573643180 -0600 +@@ -1519,13 +1519,13 @@ void CodeBlock::dumpBytecode( + int id0 = (++it)->u.operand; + ResolveModeAndType modeAndType = ResolveModeAndType((++it)->u.operand); + ++it; // Structure +- int operand = (++it)->u.operand; // Operand ++ void *operand = (++it)->u.pointer; // Operand + ++it; // Skip value profile. + printLocationAndOp(out, exec, location, it, "get_from_scope"); +- out.printf("%s, %s, %s, %u<%s|%s>, , %d", ++ out.printf("%s, %s, %s, %u<%s|%s>, , %lu", + registerName(r0).data(), registerName(r1).data(), idName(id0, identifier(id0)).data(), + modeAndType.operand(), resolveModeName(modeAndType.mode()), resolveTypeName(modeAndType.type()), +- operand); ++ reinterpret_cast(operand)); + break; + } + case op_put_to_scope: { +@@ -1534,12 +1534,12 @@ void CodeBlock::dumpBytecode( + int r1 = (++it)->u.operand; + ResolveModeAndType modeAndType = ResolveModeAndType((++it)->u.operand); + ++it; // Structure +- int operand = (++it)->u.operand; // Operand ++ void *operand = (++it)->u.pointer; // Operand + printLocationAndOp(out, exec, location, it, "put_to_scope"); +- out.printf("%s, %s, %s, %u<%s|%s>, , %d", ++ out.printf("%s, %s, %s, %u<%s|%s>, , %lu", + registerName(r0).data(), idName(id0, identifier(id0)).data(), registerName(r1).data(), + modeAndType.operand(), resolveModeName(modeAndType.mode()), resolveTypeName(modeAndType.type()), +- operand); ++ reinterpret_cast(operand)); + break; + } + default: +diff -up webkitgtk-2.5.90/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp.cloop_fix webkitgtk-2.5.90/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp +--- webkitgtk-2.5.90/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp.cloop_fix 2014-09-22 01:23:26.643580502 -0600 ++++ webkitgtk-2.5.90/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp 2014-09-24 06:02:36.574037807 -0600 +@@ -1392,7 +1396,7 @@ LLINT_SLOW_PATH_DECL(slow_path_get_from_ + { + ConcurrentJITLocker locker(codeBlock->m_lock); + pc[5].u.structure.set(exec->vm(), codeBlock->ownerExecutable(), structure); +- pc[6].u.operand = slot.cachedOffset(); ++ pc[6].u.pointer = reinterpret_cast(slot.cachedOffset()); + } + structure->startWatchingPropertyForReplacements(vm, slot.cachedOffset()); + } +diff -up webkitgtk-2.5.90/Source/JavaScriptCore/runtime/CommonSlowPaths.h.cloop_fix webkitgtk-2.5.90/Source/JavaScriptCore/runtime/CommonSlowPaths.h +--- webkitgtk-2.5.90/Source/JavaScriptCore/runtime/CommonSlowPaths.h.cloop_fix 2014-09-22 01:25:13.843908763 -0600 ++++ webkitgtk-2.5.90/Source/JavaScriptCore/runtime/CommonSlowPaths.h 2014-09-24 06:03:23.834201352 -0600 +@@ -115,7 +116,7 @@ inline void tryCachePutToScopeGlobal( + + ConcurrentJITLocker locker(codeBlock->m_lock); + pc[5].u.structure.set(exec->vm(), codeBlock->ownerExecutable(), scope->structure()); +- pc[6].u.operand = slot.cachedOffset(); ++ pc[6].u.pointer = reinterpret_cast(slot.cachedOffset()); + } + + } // namespace CommonSlowPaths diff --git a/webkitgtk-2.6.4-disable-codec-installer.patch b/webkitgtk-2.6.4-disable-codec-installer.patch new file mode 100644 index 0000000..e168113 --- /dev/null +++ b/webkitgtk-2.6.4-disable-codec-installer.patch @@ -0,0 +1,36 @@ +From a15a3ac0571bc1e3a5fb9c62e5b19a1f005445fb Mon Sep 17 00:00:00 2001 +From: Michael Catanzaro +Date: Tue, 9 Dec 2014 18:34:31 +0100 +Subject: [PATCH] Disable the PackageKit codec installer + +This is a workaround, not suitable for upstream. + +https://bugzilla.gnome.org/show_bug.cgi?id=726326 +https://bugs.webkit.org/show_bug.cgi?id=135973 +--- + .../platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp | 9 +-------- + 1 file changed, 1 insertion(+), 8 deletions(-) + +diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp +index 8c9a637..55e0b8b 100644 +--- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp ++++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp +@@ -1009,15 +1009,8 @@ gboolean MediaPlayerPrivateGStreamer::handleMessage(GstMessage* message) + } + break; + case GST_MESSAGE_ELEMENT: +- if (gst_is_missing_plugin_message(message)) { +- gchar* detail = gst_missing_plugin_message_get_installer_detail(message); +- gchar* detailArray[2] = {detail, 0}; +- GstInstallPluginsReturn result = gst_install_plugins_async(detailArray, 0, mediaPlayerPrivatePluginInstallerResultFunction, this); +- m_missingPlugins = result == GST_INSTALL_PLUGINS_STARTED_OK; +- g_free(detail); +- } + #if ENABLE(VIDEO_TRACK) && USE(GSTREAMER_MPEGTS) +- else { ++ if (!gst_is_missing_plugin_message(message)) { + GstMpegtsSection* section = gst_message_parse_mpegts_section(message); + if (section) { + processMpegTsSection(section); +-- +2.1.0 diff --git a/webkitgtk4.spec b/webkitgtk4.spec new file mode 100644 index 0000000..db9dadf --- /dev/null +++ b/webkitgtk4.spec @@ -0,0 +1,262 @@ +# Fix rebuild on non-Fedora +%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}} + +## NOTE: Lots of files in various subdirectories have the same name (such as +## "LICENSE") so this short macro allows us to distinguish them by using their +## directory names (from the source tree) as prefixes for the files. +%global add_to_license_files() \ + mkdir -p _license_files ; \ + cp -p %1 _license_files/$(echo '%1' | sed -e 's!/!.!g') + +Name: webkitgtk4 +Version: 2.6.6 +Release: 1%{?dist} +Summary: GTK+ Web content engine library + +License: LGPLv2 +URL: http://www.webkitgtk.org/ +Source0: http://webkitgtk.org/releases/webkitgtk-%{version}.tar.xz + +Patch0: webkit-1.1.14-nspluginwrapper.patch +Patch1: webkitgtk-2.6.4-disable-codec-installer.patch +Patch2: webkitgtk-2.5.90-cloop_fix.patch +Patch3: webkitgtk-2.5.2-commit_align.patch + +BuildRequires: at-spi2-core-devel +BuildRequires: bison +BuildRequires: cairo-devel +BuildRequires: cmake +BuildRequires: enchant-devel +BuildRequires: flex +BuildRequires: fontconfig-devel +BuildRequires: freetype-devel +BuildRequires: geoclue2-devel +BuildRequires: gettext +BuildRequires: glib2-devel +BuildRequires: gobject-introspection-devel +BuildRequires: gperf +BuildRequires: gstreamer1-devel +BuildRequires: gstreamer1-plugins-base-devel +BuildRequires: gtk2-devel +BuildRequires: gtk3-devel +BuildRequires: gtk-doc +BuildRequires: harfbuzz-devel +BuildRequires: libicu-devel +BuildRequires: libjpeg-devel +BuildRequires: libpng-devel +BuildRequires: libsecret-devel +BuildRequires: libsoup-devel +BuildRequires: libwebp-devel +BuildRequires: libxslt-devel +BuildRequires: libXt-devel +BuildRequires: mesa-libGL-devel +BuildRequires: pcre-devel +BuildRequires: perl-Switch +BuildRequires: ruby +BuildRequires: sqlite-devel + +Requires: geoclue2 + +# Obsolete libwebkit2gtk from the webkitgtk3 package +Obsoletes: libwebkit2gtk < 2.5.0 +Provides: libwebkit2gtk = %{version}-%{release} + +# Filter out provides for private libraries +%global __provides_exclude_from ^%{_libdir}/webkit2gtk-4\\.0/.*\\.so$ + +%description +WebKitGTK+ is the port of the portable web rendering engine WebKit to the +GTK+ platform. + +This package contains WebKitGTK+ for GTK+ 3. + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries, build data, and header +files for developing applications that use %{name}. + +%package doc +Summary: Documentation files for %{name} +BuildArch: noarch +Requires: %{name} = %{version}-%{release} + +%description doc +This package contains developer documentation for %{name}. + +%prep +%setup -q -n webkitgtk-%{version} +%patch0 -p1 -b .nspluginwrapper +%patch1 -p1 -b .disable_codec_installer +%patch2 -p1 -b .cloop_fix +%ifarch %{power64} aarch64 ppc +%patch3 -p1 -b .commit_align +%endif + +# Remove bundled libraries +rm -rf Source/ThirdParty/leveldb/ +rm -rf Source/ThirdParty/gtest/ +rm -rf Source/ThirdParty/qunit/ + +%build +# Use linker flags to reduce memory consumption +%global optflags %{optflags} -Wl,--no-keep-memory -Wl,--reduce-memory-overheads + +%ifarch s390 %{arm} +# Decrease debuginfo verbosity to reduce memory consumption even more +%global optflags %(echo %{optflags} | sed 's/-g /-g1 /') +%endif + +%ifarch ppc +# Use linker flag -relax to get WebKit build under ppc(32) with JIT disabled +%global optflags %{optflags} -Wl,-relax -latomic +%endif + +%ifarch s390 s390x ppc %{power64} aarch64 +%global optflags %{optflags} -DENABLE_YARR_JIT=0 +%endif + +mkdir -p %{_target_platform} +pushd %{_target_platform} +%cmake \ + -DPORT=GTK \ + -DCMAKE_BUILD_TYPE=Release \ + -DENABLE_GTKDOC=ON \ +%ifarch s390 s390x ppc %{power64} aarch64 + -DENABLE_JIT=OFF \ + -DENABLE_LLINT_C_LOOP=ON \ +%endif + .. +popd + +make %{?_smp_mflags} -C %{_target_platform} + +%install +%make_install -C %{_target_platform} + +%find_lang WebKit2GTK-4.0 + +# Finally, copy over and rename various files for %%license inclusion +%add_to_license_files Source/JavaScriptCore/COPYING.LIB +%add_to_license_files Source/JavaScriptCore/icu/LICENSE +%add_to_license_files Source/ThirdParty/ANGLE/LICENSE +%add_to_license_files Source/ThirdParty/ANGLE/src/third_party/compiler/LICENSE +%add_to_license_files Source/ThirdParty/ANGLE/src/third_party/murmurhash/LICENSE +%add_to_license_files Source/WebCore/icu/LICENSE +%add_to_license_files Source/WebCore/LICENSE-APPLE +%add_to_license_files Source/WebCore/LICENSE-LGPL-2 +%add_to_license_files Source/WebCore/LICENSE-LGPL-2.1 +%add_to_license_files Source/WebInspectorUI/UserInterface/External/CodeMirror/LICENSE +%add_to_license_files Source/WebInspectorUI/UserInterface/External/Esprima/LICENSE +%add_to_license_files Source/WTF/icu/LICENSE +%add_to_license_files Source/WTF/wtf/dtoa/COPYING +%add_to_license_files Source/WTF/wtf/dtoa/LICENSE + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files -f WebKit2GTK-4.0.lang +%license _license_files/* +%{_libdir}/libjavascriptcoregtk-4.0.so.* +%{_libdir}/libwebkit2gtk-4.0.so.* +%{_libdir}/girepository-1.0/JavaScriptCore-4.0.typelib +%{_libdir}/girepository-1.0/WebKit2-4.0.typelib +%{_libdir}/girepository-1.0/WebKit2WebExtension-4.0.typelib +%{_libdir}/webkit2gtk-4.0/ +%{_libexecdir}/webkit2gtk-4.0/ + +%files devel +%{_bindir}/jsc +%{_includedir}/webkitgtk-4.0/ +%{_libdir}/libjavascriptcoregtk-4.0.so +%{_libdir}/libwebkit2gtk-4.0.so +%{_libdir}/pkgconfig/javascriptcoregtk-4.0.pc +%{_libdir}/pkgconfig/webkit2gtk-4.0.pc +%{_libdir}/pkgconfig/webkit2gtk-web-extension-4.0.pc +%{_datadir}/gir-1.0/JavaScriptCore-4.0.gir +%{_datadir}/gir-1.0/WebKit2-4.0.gir +%{_datadir}/gir-1.0/WebKit2WebExtension-4.0.gir + +%files doc +%dir %{_datadir}/gtk-doc +%dir %{_datadir}/gtk-doc/html +%{_datadir}/gtk-doc/html/webkit2gtk-4.0/ +%{_datadir}/gtk-doc/html/webkitdomgtk-4.0/ + +%changelog +* Tue Apr 07 2015 Tomas Popela - 2.6.6-1 +- Update to 2.6.6 + +* Tue Mar 17 2015 Michael Catanzaro - 2.6.5-3 +- Add patch for late certificate verification + +* Mon Mar 16 2015 Michael Catanzaro - 2.6.5-2 +- Add patch for rbz#1156330 + +* Thu Jan 15 2015 Tomas Popela - 2.6.5-1 +- Update to 2.6.5 + +* Thu Dec 11 2014 Michael Catanzaro - 2.6.4-2 +- Disable the PackageKit codec installer + +* Fri Nov 21 2014 Tomas Popela - 2.6.4-1 +- Update to 2.6.4 + +* Wed Nov 12 2014 Tomas Popela - 2.6.3-1 +- Update to 2.6.3 +- Enable JIT where possible (accidentally turned off when updating to 2.5.90) + +* Fri Nov 07 2014 Kalev Lember - 2.6.2-5 +- Build developer documentation + +* Tue Nov 04 2014 Richard Hughes - 2.6.2-4 +- Fix non-Fedora build + +* Fri Oct 31 2014 Michael Catanzaro - 2.6.2-3 +- Obsolete libwebkit2gtk < 2.5.0 to be future-proof + +* Fri Oct 31 2014 Kalev Lember - 2.6.2-2 +- Bump libwebkit2gtk obsoletes version + +* Wed Oct 22 2014 Tomas Popela - 2.6.2-1 +- Update to 2.6.2 + +* Tue Oct 21 2014 Tomas Popela - 2.6.1-2 +- Disable the SSLv3 to address the POODLE vulnerability + +* Tue Oct 14 2014 Tomas Popela - 2.6.1-1 +- Update to 2.6.1 + +* Thu Sep 25 2014 Tomas Popela - 2.6.0-1 +- Add the wrongly removed CLoop patch and remove the one that was upstreamed + +* Wed Sep 24 2014 Kalev Lember - 2.6.0-1 +- Update to 2.6.0 + +* Mon Sep 22 2014 Tomas Popela - 2.5.90-1 +- Update to 2.5.90 + +* Tue Aug 26 2014 Kalev Lember - 2.5.3-6 +- Obsolete libwebkit2gtk from the webkitgtk3 package + +* Mon Aug 25 2014 Tomas Popela - 2.5.3-5 +- Add support for secondary arches + +* Fri Aug 22 2014 Michael Catanzaro - 2.5.3-4 +- Add webkitgtk-2.5.3-toggle-buttons.patch + +* Thu Aug 21 2014 Kalev Lember - 2.5.3-3 +- More package review fixes (#1131284) +- Correct the license tag to read LGPLv2 +- Filter out provides for private libraries + +* Tue Aug 19 2014 Kalev Lember - 2.5.3-2 +- Remove bundled leveldb, gtest, qunit in %%prep (#1131284) + +* Fri Aug 15 2014 Kalev Lember - 2.5.3-1 +- Update to 2.5.3 + +* Fri Aug 01 2014 Kalev Lember - 2.5.1-1 +- Initial Fedora packaging, based on the webkitgtk3 package