[webkitgtk4] Add Fedora branding to the user agent

catanzaro catanzaro at fedoraproject.org
Fri Feb 27 06:10:56 UTC 2015


commit 3920853627e6f8ae1ad7a4bd5ac5ccf0549d7a53
Author: Michael Catanzaro <mcatanzaro at gnome.org>
Date:   Fri Feb 27 00:10:54 2015 -0600

    Add Fedora branding to the user agent

 webkitgtk-2.7.90-user-agent-branding.patch | 27 +++++++++++++++++++++++++++
 webkitgtk4.spec                            | 12 +++++++++++-
 2 files changed, 38 insertions(+), 1 deletion(-)
---
diff --git a/webkitgtk-2.7.90-user-agent-branding.patch b/webkitgtk-2.7.90-user-agent-branding.patch
new file mode 100644
index 0000000..84b5117
--- /dev/null
+++ b/webkitgtk-2.7.90-user-agent-branding.patch
@@ -0,0 +1,27 @@
+From 050232bc122d6785fea01d39121c2f93e8dd16f1 Mon Sep 17 00:00:00 2001
+From: Michael Catanzaro <mcatanzaro at igalia.com>
+Date: Thu, 26 Feb 2015 16:06:36 -0600
+Subject: [PATCH] Allow branding the user agent
+
+---
+ Source/WebCore/platform/gtk/UserAgentGtk.cpp | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/Source/WebCore/platform/gtk/UserAgentGtk.cpp b/Source/WebCore/platform/gtk/UserAgentGtk.cpp
+index 91641dc..727fbaf 100644
+--- a/Source/WebCore/platform/gtk/UserAgentGtk.cpp
++++ b/Source/WebCore/platform/gtk/UserAgentGtk.cpp
+@@ -84,7 +84,9 @@ static const char* cpuDescriptionForUAString()
+ 
+ static const char* platformForUAString()
+ {
+-#if PLATFORM(X11)
++#if defined USER_AGENT_GTK_DISTRIBUTOR_NAME
++    return USER_AGENT_GTK_DISTRIBUTOR_NAME;
++#elif PLATFORM(X11)
+     return "X11";
+ #elif OS(WINDOWS)
+     return "";
+-- 
+2.1.0
+
diff --git a/webkitgtk4.spec b/webkitgtk4.spec
index 6a46336..981c8e3 100644
--- a/webkitgtk4.spec
+++ b/webkitgtk4.spec
@@ -9,7 +9,7 @@
 
 Name:           webkitgtk4
 Version:        2.7.90
-Release:        9%{?dist}
+Release:        10%{?dist}
 Summary:        GTK+ Web content engine library
 
 License:        LGPLv2
@@ -17,6 +17,8 @@ URL:            http://www.webkitgtk.org/
 Source0:        http://webkitgtk.org/releases/webkitgtk-%{version}.tar.xz
 
 Patch0:         webkitgtk-2.7.4-nspluginwrapper.patch
+# https://bugs.webkit.org/show_bug.cgi?id=142074
+Patch1:         webkitgtk-2.7.90-user-agent-branding.patch
 Patch2:         webkitgtk-2.5.90-cloop_fix.patch
 Patch3:         webkitgtk-2.5.2-commit_align.patch
 # https://bugs.webkit.org/show_bug.cgi?id=141717
@@ -101,6 +103,7 @@ This package contains developer documentation for %{name}.
 %prep
 %setup -q -n webkitgtk-%{version}
 %patch0 -p1 -b .nspluginwrapper
+%patch1 -p1 -b .user_agent
 # FIXME Temporarily disabled due to https://bugzilla.redhat.com/show_bug.cgi?id=1167004
 #%patch2 -p1 -b .cloop_fix
 %ifarch %{power64} aarch64 ppc
@@ -140,6 +143,10 @@ rm -rf Source/ThirdParty/qunit/
 %global optflags %{optflags} -DENABLE_YARR_JIT=0
 %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}
@@ -213,6 +220,9 @@ make %{?_smp_mflags} -C %{_target_platform}
 %{_datadir}/gtk-doc/html/webkitdomgtk-4.0/
 
 %changelog
+* Thu Feb 26 2015 Michael Catanzaro <mcatanzaro at gnome.org> - 2.7.90-10
+- Add Fedora branding to the user agent
+
 * Thu Feb 19 2015 Tomas Popela <tpopela at redhat.com> - 2.7.90-9
 - Fix the build with cmake 3.2.x
 


More information about the scm-commits mailing list