From 3540c559241d5beb1a8736d7eb3a8eb013759902 Mon Sep 17 00:00:00 2001 From: Tomas Popela Date: Jan 12 2018 07:58:12 +0000 Subject: This package was formerly named webkitgtk4 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4c9d956 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/webkitgtk-2.19.5.tar.xz diff --git a/README.md b/README.md deleted file mode 100644 index cc56aa2..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# webkit2gtk3 - -The webkit2gtk3 package \ No newline at end of file diff --git a/cloop-big-endians.patch b/cloop-big-endians.patch new file mode 100644 index 0000000..7bb12df --- /dev/null +++ b/cloop-big-endians.patch @@ -0,0 +1,30 @@ +diff -up webkitgtk-2.14.7/Source/JavaScriptCore/bytecode/CodeBlock.cpp.b132333 webkitgtk-2.14.7/Source/JavaScriptCore/bytecode/CodeBlock.cpp +--- webkitgtk-2.14.7/Source/JavaScriptCore/bytecode/CodeBlock.cpp.b132333 2017-02-07 09:05:07.000000000 +0100 ++++ webkitgtk-2.14.7/Source/JavaScriptCore/bytecode/CodeBlock.cpp 2017-06-16 10:34:57.859748036 +0200 +@@ -2186,7 +2186,12 @@ void CodeBlock::finishCreation(VM& vm, S + instructions[i + 5].u.watchpointSet = op.watchpointSet; + else if (op.structure) + instructions[i + 5].u.structure.set(vm, this, op.structure); +- instructions[i + 6].u.pointer = reinterpret_cast(op.operand); ++ ++ if (op.type == ClosureVar || op.type == ClosureVarWithVarInjectionChecks || op.type == GlobalProperty || op.type == GlobalPropertyWithVarInjectionChecks || op.type == ModuleVar) ++ instructions[i + 6].u.operand = op.operand; ++ else ++ instructions[i + 6].u.pointer = reinterpret_cast(op.operand); ++ + break; + } + +@@ -2222,7 +2227,11 @@ void CodeBlock::finishCreation(VM& vm, S + op.watchpointSet->invalidate(vm, PutToScopeFireDetail(this, ident)); + } else if (op.structure) + instructions[i + 5].u.structure.set(vm, this, op.structure); +- instructions[i + 6].u.pointer = reinterpret_cast(op.operand); ++ ++ if (op.type == ClosureVar || op.type == ClosureVarWithVarInjectionChecks || op.type == GlobalProperty || op.type == GlobalPropertyWithVarInjectionChecks || op.type == ModuleVar) ++ instructions[i + 6].u.operand = op.operand; ++ else ++ instructions[i + 6].u.pointer = reinterpret_cast(op.operand); + + break; + } diff --git a/fedora-crypto-policy.patch b/fedora-crypto-policy.patch new file mode 100644 index 0000000..8a317db --- /dev/null +++ b/fedora-crypto-policy.patch @@ -0,0 +1,24 @@ +diff -up webkitgtk-2.17.92/Source/WebKit/NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp.fedora-crypto-policy webkitgtk-2.17.92/Source/WebKit/NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp +--- webkitgtk-2.17.92/Source/WebKit/NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp.fedora-crypto-policy 2017-09-05 13:39:59.294426661 +0200 ++++ webkitgtk-2.17.92/Source/WebKit/NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp 2017-09-05 13:40:09.144389997 +0200 +@@ -43,7 +43,7 @@ int main(int argc, char** argv) + // overwrite this priority string if it's already set by the user. + // https://bugzilla.gnome.org/show_bug.cgi?id=738633 + // WARNING: This needs to be KEPT IN SYNC with WebProcessMain.cpp. +- setenv("G_TLS_GNUTLS_PRIORITY", "NORMAL:%COMPAT:!VERS-SSL3.0:!ARCFOUR-128", 0); ++ setenv("G_TLS_GNUTLS_PRIORITY", "@SYSTEM:%COMPAT:!VERS-SSL3.0:!ARCFOUR-128", 0); + + #if USE(GCRYPT) + PAL::GCrypt::initialize(); +diff -up webkitgtk-2.17.92/Source/WebKit/WebProcess/EntryPoint/unix/WebProcessMain.cpp.fedora-crypto-policy webkitgtk-2.17.92/Source/WebKit/WebProcess/EntryPoint/unix/WebProcessMain.cpp +--- webkitgtk-2.17.92/Source/WebKit/WebProcess/EntryPoint/unix/WebProcessMain.cpp.fedora-crypto-policy 2017-09-05 13:40:28.558317735 +0200 ++++ webkitgtk-2.17.92/Source/WebKit/WebProcess/EntryPoint/unix/WebProcessMain.cpp 2017-09-05 13:40:56.057215378 +0200 +@@ -43,7 +43,7 @@ int main(int argc, char** argv) + // overwrite this priority string if it's already set by the user. + // https://bugzilla.gnome.org/show_bug.cgi?id=738633 + // WARNING: This needs to be KEPT IN SYNC with WebProcessMain.cpp. +- setenv("G_TLS_GNUTLS_PRIORITY", "NORMAL:%COMPAT:!VERS-SSL3.0:!ARCFOUR-128", 0); ++ setenv("G_TLS_GNUTLS_PRIORITY", "@SYSTEM:%COMPAT:!VERS-SSL3.0:!ARCFOUR-128", 0); + + #if USE(GCRYPT) + PAL::GCrypt::initialize(); diff --git a/sources b/sources new file mode 100644 index 0000000..06376b2 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (webkitgtk-2.19.5.tar.xz) = a3f22d7764be5118ab9065931c19c87993e5a1fcdbb532462e7158200e98eda417fcc12cdef340e6612eb799926c70d61457d1bfe07347755102e7ed882a9285 diff --git a/user-agent-branding.patch b/user-agent-branding.patch new file mode 100644 index 0000000..d87f3e7 --- /dev/null +++ b/user-agent-branding.patch @@ -0,0 +1,13 @@ +diff -up webkitglib-2.14.1/Source/WebCore/platform/glib/UserAgentGLib.cpp.orig webkitglib-2.14.1/Source/WebCore/platform/glib/UserAgentGLib.cpp +--- webkitglib-2.14.1/Source/WebCore/platform/glib/UserAgentGLib.cpp.orig 2016-10-12 07:59:25.670057792 +0200 ++++ webkitglib-2.14.1/Source/WebCore/platform/glib/UserAgentGLib.cpp 2016-10-12 08:01:06.251878684 +0200 +@@ -85,6 +85,9 @@ static String buildUserAgentString(const UserAgentQuirks& quirks) + else { + uaString.append(platformForUAString()); + uaString.appendLiteral("; "); ++#if defined(USER_AGENT_GTK_DISTRIBUTOR_NAME) ++ uaString.appendLiteral(USER_AGENT_GTK_DISTRIBUTOR_NAME "; "); ++#endif + uaString.append(platformVersionForUAString()); + } + diff --git a/webkit2gtk3.spec b/webkit2gtk3.spec new file mode 100644 index 0000000..393014d --- /dev/null +++ b/webkit2gtk3.spec @@ -0,0 +1,295 @@ +## 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: webkit2gtk3 +Version: 2.19.5 +Release: 2%{?dist} +Summary: GTK+ Web content engine library + +License: LGPLv2 +URL: http://www.webkitgtk.org/ +Source0: http://webkitgtk.org/releases/webkitgtk-%{version}.tar.xz + +# https://bugs.webkit.org/show_bug.cgi?id=162611 +Patch0: user-agent-branding.patch +# https://fedoraproject.org/wiki/Packaging:CryptoPolicies +# https://bugs.webkit.org/show_bug.cgi?id=158785 +Patch1: fedora-crypto-policy.patch +# https://bugs.webkit.org/show_bug.cgi?id=132333 +Patch2: cloop-big-endians.patch + +BuildRequires: at-spi2-core-devel +BuildRequires: bison +BuildRequires: brotli-devel +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: gnutls-devel +BuildRequires: gobject-introspection-devel +BuildRequires: gperf +BuildRequires: gstreamer1-devel +BuildRequires: gstreamer1-plugins-base-devel +BuildRequires: gstreamer1-plugins-bad-free-devel +BuildRequires: gtk2-devel +BuildRequires: gtk3-devel +BuildRequires: gtk-doc +BuildRequires: harfbuzz-devel +BuildRequires: hyphen-devel +BuildRequires: libicu-devel +BuildRequires: libjpeg-devel +BuildRequires: libnotify-devel +BuildRequires: libpng-devel +BuildRequires: libsecret-devel +BuildRequires: libsoup-devel +BuildRequires: libwebp-devel +BuildRequires: libxslt-devel +BuildRequires: libXt-devel +BuildRequires: libwayland-client-devel +BuildRequires: libwayland-egl-devel +BuildRequires: libwayland-server-devel +BuildRequires: mesa-libEGL-devel +BuildRequires: mesa-libGL-devel +BuildRequires: mesa-libGLES-devel +BuildRequires: pcre-devel +BuildRequires: perl-File-Copy-Recursive +BuildRequires: perl-JSON-PP +BuildRequires: perl-Switch +BuildRequires: ruby +BuildRequires: rubygems +BuildRequires: sqlite-devel +BuildRequires: upower-devel +BuildRequires: woff2-devel +%ifarch ppc +BuildRequires: libatomic +%endif + +Requires: geoclue2 + +# Obsolete libwebkit2gtk from the webkitgtk3 package +Obsoletes: libwebkit2gtk < 2.5.0 +Provides: libwebkit2gtk = %{version}-%{release} + +# This package was renamed, so obsolete the old webkitgtk4 package +Obsoletes: webkitgtk4 < 2.19.5-2 +Provides: webkitgtk4 = %{version}-%{release} + +# We're supposed to specify versions here, but these crap Google libs don't do +# normal releases. Accordingly, they're not suitable to be system libs. +Provides: bundled(angle) + +# Require the jsc subpackage +Requires: %{name}-jsc%{?_isa} = %{version}-%{release} + +# Recommend the support for the GTK+ 2 based NPAPI plugins +Recommends: %{name}-plugin-process-gtk2%{?_isa} = %{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 WebKit2 based WebKitGTK+ for GTK+ 3. + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-jsc%{?_isa} = %{version}-%{release} +Requires: %{name}-jsc-devel%{?_isa} = %{version}-%{release} +Obsoletes: webkitgtk4-devel < 2.19.5-2 +Provides: webkitgtk4-devel = %{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} +Obsoletes: webkitgtk4-doc < 2.19.5-2 +Provides: webkitgtk4-doc = %{version}-%{release} + +%description doc +This package contains developer documentation for %{name}. + +%package jsc +Summary: JavaScript engine from %{name} +Obsoletes: webkitgtk4-jsc < 2.19.5-2 +Provides: webkitgtk4-jsc = %{version}-%{release} + +%description jsc +This package contains JavaScript engine from %{name}. + +%package jsc-devel +Summary: Development files for JavaScript engine from %{name} +Requires: %{name}-jsc%{?_isa} = %{version}-%{release} +Obsoletes: webkitgtk4-jsc-devel < 2.19.5-2 +Provides: webkitgtk4-jsc-devel = %{version}-%{release} + +%description jsc-devel +The %{name}-jsc-devel package contains libraries, build data, and header +files for developing applications that use JavaScript engine from %{name}. + +%package plugin-process-gtk2 +Summary: GTK+ 2 based NPAPI plugins support for %{name} +Requires: %{name}-jsc%{?_isa} = %{version}-%{release} +Obsoletes: %{name} < 2.12.0-3 +Obsoletes: webkitgtk4-plugin-process-gtk2 < 2.19.5-2 +Provides: webkitgtk4-plugin-process-gtk2 = %{version}-%{release} + +%description plugin-process-gtk2 +Support for the GTK+ 2 based NPAPI plugins (such as Adobe Flash) for %{name}. + +%prep +%autosetup -p1 -n webkitgtk-%{version} + +# Remove bundled libraries +rm -rf Source/ThirdParty/gtest/ +rm -rf Source/ThirdParty/qunit/ + +%build +# Increase the DIE limit so our debuginfo packages could be size optimized. +# Decreases the size for x86_64 from ~5G to ~1.1G. +# https://bugzilla.redhat.com/show_bug.cgi?id=1456261 +%global _dwz_max_die_limit 250000000 +# The _dwz_max_die_limit is being overridden by the arch specific ones from the +# redhat-rpm-config so we need to set the arch specific ones as well - now it +# is only needed for x86_64. +%global _dwz_max_die_limit_x86_64 250000000 + +%ifarch s390 aarch64 +# Use linker flags to reduce memory consumption - on other arches the ld.gold is +# used and also it doesn't have the --reduce-memory-overheads option +%global optflags %{optflags} -Wl,--no-keep-memory -Wl,--reduce-memory-overheads +%endif + +# Decrease debuginfo even on ix86 because of: +# https://bugs.webkit.org/show_bug.cgi?id=140176 +%ifarch s390 s390x %{arm} %{ix86} ppc %{power64} %{mips} +# 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 +%endif + +%if 0%{?fedora} +%global optflags %{optflags} -DUSER_AGENT_GTK_DISTRIBUTOR_NAME=\'\\"Fedora\\"\' +%endif + +# Disable ld.gold on s390 as it does not have it. +# Also for aarch64 as the support is in upstream, but not packaged in Fedora. +mkdir -p %{_target_platform} +pushd %{_target_platform} +%cmake \ + -DPORT=GTK \ + -DCMAKE_BUILD_TYPE=Release \ + -DENABLE_GTKDOC=ON \ + -DENABLE_MINIBROWSER=ON \ +%ifarch s390 aarch64 + -DUSE_LD_GOLD=OFF \ +%endif +%ifarch s390 s390x ppc %{power64} + -DENABLE_JIT=OFF \ + -DUSE_SYSTEM_MALLOC=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/common/third_party/smhasher/LICENSE +%add_to_license_files Source/ThirdParty/ANGLE/src/third_party/compiler/LICENSE +%add_to_license_files Source/ThirdParty/ANGLE/src/third_party/libXNVCtrl/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/ESLint/LICENSE +%add_to_license_files Source/WebInspectorUI/UserInterface/External/Esprima/LICENSE +%add_to_license_files Source/WebInspectorUI/UserInterface/External/three.js/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 +%post jsc -p /sbin/ldconfig +%postun jsc -p /sbin/ldconfig + +%files -f WebKit2GTK-4.0.lang +%license _license_files/*ThirdParty* +%license _license_files/*WebCore* +%license _license_files/*WebInspectorUI* +%license _license_files/*WTF* +%{_libdir}/libwebkit2gtk-4.0.so.* +%dir %{_libdir}/girepository-1.0 +%{_libdir}/girepository-1.0/WebKit2-4.0.typelib +%{_libdir}/girepository-1.0/WebKit2WebExtension-4.0.typelib +%{_libdir}/webkit2gtk-4.0/ +%{_libexecdir}/webkit2gtk-4.0/ +%{_bindir}/WebKitWebDriver +%exclude %{_libexecdir}/webkit2gtk-4.0/WebKitPluginProcess2 + +%files devel +%{_libexecdir}/webkit2gtk-4.0/MiniBrowser +%{_includedir}/webkitgtk-4.0/ +%exclude %{_includedir}/webkitgtk-4.0/JavaScriptCore +%{_libdir}/libwebkit2gtk-4.0.so +%{_libdir}/pkgconfig/webkit2gtk-4.0.pc +%{_libdir}/pkgconfig/webkit2gtk-web-extension-4.0.pc +%dir %{_datadir}/gir-1.0 +%{_datadir}/gir-1.0/WebKit2-4.0.gir +%{_datadir}/gir-1.0/WebKit2WebExtension-4.0.gir + +%files jsc +%license _license_files/*JavaScriptCore* +%{_libdir}/libjavascriptcoregtk-4.0.so.* +%dir %{_libdir}/girepository-1.0 +%{_libdir}/girepository-1.0/JavaScriptCore-4.0.typelib + +%files jsc-devel +%{_libexecdir}/webkit2gtk-4.0/jsc +%dir %{_includedir}/webkitgtk-4.0 +%{_includedir}/webkitgtk-4.0/JavaScriptCore/ +%{_libdir}/libjavascriptcoregtk-4.0.so +%{_libdir}/pkgconfig/javascriptcoregtk-4.0.pc +%dir %{_datadir}/gir-1.0 +%{_datadir}/gir-1.0/JavaScriptCore-4.0.gir + +%files plugin-process-gtk2 +%{_libexecdir}/webkit2gtk-4.0/WebKitPluginProcess2 + +%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 +* Thu Jan 11 2018 Tomas Popela - 2.19.5-2 +- This package was formerly named webkitgtk4