commit a8d17a6625512a6ff53b95cdc143da9505839ac0
Author: qvint <dotqvint(a)gmail.com>
Date: Wed Jan 20 12:32:00 2021 +0300
Fix app icon and name in various places
- Fix Icon key in chrome-apps.directory[1]
- Fix PulseAudio application name and icon
- Don't depend on CHROME_DESKTOP env var
[1] See
https://bugzilla.rpmfusion.org/show_bug.cgi?id=5895
chromium-freeworld.sh | 1 -
chromium-freeworld.spec | 6 ++++
chromium-names.patch | 91 +++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 97 insertions(+), 1 deletion(-)
---
diff --git a/chromium-freeworld.sh b/chromium-freeworld.sh
index 68efad3..08539d3 100644
--- a/chromium-freeworld.sh
+++ b/chromium-freeworld.sh
@@ -13,7 +13,6 @@ CHROMIUM_DISTRO_FLAGS=()
export CHROME_WRAPPER="$(readlink -f "$0")"
HERE="`dirname "$CHROME_WRAPPER"`"
-export CHROME_DESKTOP="chromium-freeworld.desktop"
# We include some xdg utilities next to the binary, and we want to prefer them
# over the system versions when we know the system versions are very old. We
# detect whether the system xdg utilities are sufficiently new to be likely to
diff --git a/chromium-freeworld.spec b/chromium-freeworld.spec
index ae05369..aa364c7 100644
--- a/chromium-freeworld.spec
+++ b/chromium-freeworld.spec
@@ -154,6 +154,7 @@ Patch401: chromium-fix-vaapi-on-intel.patch
Patch402: chromium-enable-widevine.patch
Patch403: chromium-manpage.patch
Patch404: chromium-md5-based-build-id.patch
+Patch405: chromium-names.patch
%if %{freeworld}
Patch420: chromium-rpm-fusion-brand.patch
%endif
@@ -489,6 +490,8 @@ export CFLAGS="$CFLAGS -g0"
export CXXFLAGS="$CXXFLAGS -g0"
gn_args=(
+ 'rpm_fusion_package_name="%{name}"'
+ 'rpm_fusion_menu_name="%{menu_name}"'
is_debug=false
use_vaapi=true
is_component_build=false
@@ -665,6 +668,9 @@ appstream-util validate-relax --nonet
"%{buildroot}%{_metainfodir}/%{name}.appda
%changelog
* Wed Jan 20 2021 qvint <dotqvint(a)gmail.com> - 88.0.4324.96-1
- Update to 88.0.4324.96
+- Fix Icon key in chrome-apps.directory (rfbz#5895)
+- Fix PulseAudio application name and icon
+- Don't depend on CHROME_DESKTOP env var
* Tue Dec 08 2020 qvint <dotqvint(a)gmail.com> - 87.0.4280.88-1
- Update to 87.0.4280.88
diff --git a/chromium-names.patch b/chromium-names.patch
new file mode 100644
index 0000000..63d817a
--- /dev/null
+++ b/chromium-names.patch
@@ -0,0 +1,91 @@
+Replace hard-coded "chromium-browser" with package name.
+
+* Fixes Icon key in chrome-apps.directory.
+
https://bugzilla.rpmfusion.org/show_bug.cgi?id=5895
+
+* Fixes PulseAudio application name and icon
+ as seen from pavucontrol.
+
+* Prevents showing "Chromium isn't your default browser",
+ when the browser is launched directly without the wrapper.
+
+--- a/chrome/browser/BUILD.gn
++++ b/chrome/browser/BUILD.gn
+@@ -4966,6 +4966,7 @@ static_library("browser") {
+ "upgrade_detector/directory_monitor.h",
+ "upgrade_detector/get_installed_version_linux.cc",
+ ]
++ configs += [ "//third_party/rpm_fusion:defines" ]
+ deps += [ "//chrome/app/theme:chrome_unscaled_resources_grit" ]
+
+ if (use_dbus) {
+--- a/chrome/browser/shell_integration_linux.cc
++++ b/chrome/browser/shell_integration_linux.cc
+@@ -414,7 +414,7 @@ std::string GetIconName() {
+ #if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+ return "google-chrome";
+ #else // BUILDFLAG(CHROMIUM_BRANDING)
+- return "chromium-browser";
++ return RPM_FUSION_PACKAGE_NAME;
+ #endif
+ }
+
+--- a/chrome/common/BUILD.gn
++++ b/chrome/common/BUILD.gn
+@@ -79,6 +79,7 @@ source_set("channel_info") {
+ deps += [ "//chromeos/crosapi/cpp" ]
+ } else if (is_posix) {
+ sources += [ "channel_info_posix.cc" ]
++ configs += [ "//third_party/rpm_fusion:defines" ]
+ }
+ }
+
+--- a/chrome/common/channel_info_posix.cc
++++ b/chrome/common/channel_info_posix.cc
+@@ -93,7 +93,7 @@ std::string GetDesktopName(base::Environ
+ std::string name;
+ if (env->GetVar("CHROME_DESKTOP", &name) && !name.empty())
+ return name;
+- return "chromium-browser.desktop";
++ return RPM_FUSION_PACKAGE_NAME ".desktop";
+ #endif
+ }
+ #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS)
+--- a/media/audio/BUILD.gn
++++ b/media/audio/BUILD.gn
+@@ -296,6 +296,8 @@ source_set("audio") {
+ "pulse/pulse_util.h",
+ ]
+
++ configs += [ "//third_party/rpm_fusion:defines" ]
++
+ deps += [ "//build:branding_buildflags" ]
+
+ if (link_pulseaudio) {
+--- a/media/audio/pulse/pulse_util.cc
++++ b/media/audio/pulse/pulse_util.cc
+@@ -37,8 +37,8 @@ namespace {
+ constexpr char kBrowserDisplayName[] = "google-chrome";
+ #define PRODUCT_STRING "Google Chrome"
+ #else
+-constexpr char kBrowserDisplayName[] = "chromium-browser";
+-#define PRODUCT_STRING "Chromium"
++constexpr char kBrowserDisplayName[] = RPM_FUSION_PACKAGE_NAME;
++#define PRODUCT_STRING RPM_FUSION_MENU_NAME
+ #endif
+
+ #if defined(DLOPEN_PULSEAUDIO)
+--- /dev/null
++++ b/third_party/rpm_fusion/BUILD.gn
+@@ -0,0 +1,11 @@
++declare_args() {
++ rpm_fusion_package_name = "chromium-browser"
++ rpm_fusion_menu_name = "Chromium"
++}
++
++config("defines") {
++ defines = [
++ "RPM_FUSION_PACKAGE_NAME=\"$rpm_fusion_package_name\"",
++ "RPM_FUSION_MENU_NAME=\"$rpm_fusion_menu_name\"",
++ ]
++}