unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
blob fec0b812f151317601b6f015c36a408cd48384a8 2085 bytes (raw)
name: gnu/packages/patches/webkitgtk-bind-all-fonts.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
 
Add fonts from all XDG_DATA_DIRS, not just XDG_DATA_HOME.

See <http://bugs.gnu.org/41174>.
Author: Leo Prikler <leo.prikler@student.tugraz.at>
Index: webkitgtk-2.28.2/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
===================================================================
--- webkitgtk-2.28.2.orig/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
+++ webkitgtk-2.28.2/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
@@ -385,8 +385,8 @@ static void bindFonts(Vector<CString>& a
 {
     const char* configDir = g_get_user_config_dir();
     const char* homeDir = g_get_home_dir();
-    const char* dataDir = g_get_user_data_dir();
     const char* cacheDir = g_get_user_cache_dir();
+    const char* const * dataDirs = g_get_system_data_dirs();

     // Configs can include custom dirs but then we have to parse them...
     GUniquePtr<char> fontConfig(g_build_filename(configDir, "fontconfig", nullptr));
@@ -394,15 +394,17 @@ static void bindFonts(Vector<CString>& a
     GUniquePtr<char> fontCache(g_build_filename(cacheDir, "fontconfig", nullptr));
     GUniquePtr<char> fontHomeConfig(g_build_filename(homeDir, ".fonts.conf", nullptr));
     GUniquePtr<char> fontHomeConfigDir(g_build_filename(configDir, ".fonts.conf.d", nullptr));
-    GUniquePtr<char> fontData(g_build_filename(dataDir, "fonts", nullptr));
     GUniquePtr<char> fontHomeData(g_build_filename(homeDir, ".fonts", nullptr));
     bindIfExists(args, fontConfig.get());
     bindIfExists(args, fontConfigHome.get());
     bindIfExists(args, fontCache.get(), BindFlags::ReadWrite);
     bindIfExists(args, fontHomeConfig.get());
     bindIfExists(args, fontHomeConfigDir.get());
-    bindIfExists(args, fontData.get());
     bindIfExists(args, fontHomeData.get());
+    for (auto dataDir = dataDirs; dataDir != nullptr && *dataDir != nullptr; dataDir++) {
+        GUniquePtr<char> fontDataDir(g_build_filename(*dataDir, "fonts", nullptr));
+        bindIfExists(args, fontDataDir.get());
+    }
     bindIfExists(args, "/var/cache/fontconfig"); // Used by Debian.
 }

debug log:

solving fec0b812f1 ...
found fec0b812f1 in https://yhetil.org/guix-bugs/20200526181345.32726-1-leo.prikler@student.tugraz.at/

applying [1/1] https://yhetil.org/guix-bugs/20200526181345.32726-1-leo.prikler@student.tugraz.at/
diff --git a/gnu/packages/patches/webkitgtk-bind-all-fonts.patch b/gnu/packages/patches/webkitgtk-bind-all-fonts.patch
new file mode 100644
index 0000000000..fec0b812f1

Checking patch gnu/packages/patches/webkitgtk-bind-all-fonts.patch...
Applied patch gnu/packages/patches/webkitgtk-bind-all-fonts.patch cleanly.

index at:
100644 fec0b812f151317601b6f015c36a408cd48384a8	gnu/packages/patches/webkitgtk-bind-all-fonts.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).