[webkitgtk3/f22] Add Fedora branding to the user agent

catanzaro catanzaro at fedoraproject.org
Fri Feb 27 20:47:49 UTC 2015


commit bbc9c5d67391a30607418c4ea5129bb00d8898e1
Author: Michael Catanzaro <mcatanzaro at gnome.org>
Date:   Fri Feb 27 14:45:27 2015 -0600

    Add Fedora branding to the user agent

 webkitgtk-2.4.8-user-agent.patch | 27 +++++++++++++++++++++++++++
 webkitgtk3.spec                  | 12 +++++++++++-
 2 files changed, 38 insertions(+), 1 deletion(-)
---
diff --git a/webkitgtk-2.4.8-user-agent.patch b/webkitgtk-2.4.8-user-agent.patch
new file mode 100644
index 0000000..84b5117
--- /dev/null
+++ b/webkitgtk-2.4.8-user-agent.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/webkitgtk3.spec b/webkitgtk3.spec
index 2539bf3..e473dec 100644
--- a/webkitgtk3.spec
+++ b/webkitgtk3.spec
@@ -10,7 +10,7 @@
 
 Name:           webkitgtk3
 Version:        2.4.8
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        GTK+ Web content engine library
 
 Group:          Development/Libraries
@@ -30,6 +30,8 @@ Patch5:         webkitgtk-2.4.8-plugin_none.patch
 Patch6:         webkitgtk-2.4.8-gcc5.patch
 # https://bugs.webkit.org/show_bug.cgi?id=141381
 Patch7:         webkitgtk-2.4.8-gmutexlocker.patch
+# https://bugs.webkit.org/show_bug.cgi?id=142074
+Patch8:         webkitgtk-2.4.8-user-agent.patch
 
 BuildRequires:  at-spi2-core-devel
 BuildRequires:  bison
@@ -100,6 +102,7 @@ This package contains developer documentation for %{name}.
 %patch5 -p1 -b .plugin_none
 %patch6 -p1 -b .gcc5
 %patch7 -p1 -b .gmutex_locker
+%patch8 -p1 -b .user_agent
 %ifarch ppc s390
 %patch3 -p1 -b .cloop_fix_32
 %endif
@@ -130,6 +133,10 @@ autoreconf -v
 %global optflags %{optflags} -DENABLE_YARR_JIT=0
 %endif
 
+%if 0%{?fedora}
+%global optflags %{optflags} -DUSER_AGENT_GTK_DISTRIBUTOR_NAME=\'\\"Fedora\\"\'
+%endif
+
 %configure                                                      \
                         --with-gtk=3.0                          \
                         --disable-webkit2                       \
@@ -214,6 +221,9 @@ find $RPM_BUILD_ROOT%{_libdir} -name "*.la" -delete
 %{_datadir}/gtk-doc/html/webkitdomgtk
 
 %changelog
+* Fri Feb 27 2015 Michael Catanzaro <mcatanzaro at gnome.org> - 2.4.8-4
+- Add Fedora branding to the user agent
+
 * Wed Feb 18 2015 Tomas Popela <tpopela at redhat.com> - 2.4.8-3
 - Add support for gcc 5.0
 - Let the package compile with latest glib


More information about the scm-commits mailing list