summaryrefslogtreecommitdiff
path: root/recipes/fontconfig/0001-Overwrite-symlinks-for-config-files.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/fontconfig/0001-Overwrite-symlinks-for-config-files.patch')
-rw-r--r--recipes/fontconfig/0001-Overwrite-symlinks-for-config-files.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/recipes/fontconfig/0001-Overwrite-symlinks-for-config-files.patch b/recipes/fontconfig/0001-Overwrite-symlinks-for-config-files.patch
new file mode 100644
index 00000000..17e0cf0d
--- /dev/null
+++ b/recipes/fontconfig/0001-Overwrite-symlinks-for-config-files.patch
@@ -0,0 +1,41 @@
+From 615e2cb844a7eb266aa562071a26093ae3ec4d28 Mon Sep 17 00:00:00 2001
+From: Akira TAGOH <akira@tagoh.org>
+Date: Tue, 2 Mar 2021 19:29:08 +0900
+Subject: [PATCH] Overwrite symlinks for config files
+
+In Makefile, we are trying to remove old symlinks first and then create a symlink.
+do the same thing in meson too.
+
+Also, the line of the exception handling for FileExistsError is meaningless
+as the above line is taking care of it instead and we shouldn't ignore it if
+os.remove and os.symlink doesn't work somehow.
+
+Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/275
+---
+ conf.d/link_confs.py | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/conf.d/link_confs.py b/conf.d/link_confs.py
+index 5a78d8d..e195095 100644
+--- a/conf.d/link_confs.py
++++ b/conf.d/link_confs.py
+@@ -20,6 +20,10 @@ if __name__=='__main__':
+ for link in args.links:
+ src = os.path.join(args.availpath, link)
+ dst = os.path.join(confpath, link)
++ try:
++ os.remove(dst)
++ except FileNotFoundError:
++ pass
+ try:
+ os.symlink(src, dst)
+ except NotImplementedError:
+@@ -30,5 +34,3 @@ if __name__=='__main__':
+ if platform.system().lower() == 'windows' and e.winerror == 1314:
+ break
+ raise
+- except FileExistsError:
+- pass
+--
+2.31.1.windows.1
+