summary refs log tree commit diff
path: root/pkgs/development/libraries/fontconfig/config-compat.patch
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2015-04-18 11:00:58 +0200
committerVladimír Čunát <vcunat@gmail.com>2015-04-18 11:22:20 +0200
commitbf414c9d4f892fd4e392a5f42016b57e84402a8b (patch)
tree08c000d609ed8e608ca542fa78360e4217f3fc36 /pkgs/development/libraries/fontconfig/config-compat.patch
parent29901451700a7382f3f9d5a0a23cd55b187e5585 (diff)
parent9de9669496a05f64ea436c01f9b66c057cd74f90 (diff)
downloadnixpkgs-bf414c9d4f892fd4e392a5f42016b57e84402a8b.tar
nixpkgs-bf414c9d4f892fd4e392a5f42016b57e84402a8b.tar.gz
nixpkgs-bf414c9d4f892fd4e392a5f42016b57e84402a8b.tar.bz2
nixpkgs-bf414c9d4f892fd4e392a5f42016b57e84402a8b.tar.lz
nixpkgs-bf414c9d4f892fd4e392a5f42016b57e84402a8b.tar.xz
nixpkgs-bf414c9d4f892fd4e392a5f42016b57e84402a8b.tar.zst
nixpkgs-bf414c9d4f892fd4e392a5f42016b57e84402a8b.zip
Merge 'staging' into closure-size
- there were many easy merge conflicts
- cc-wrapper needed nontrivial changes

Many other problems might've been created by interaction of the branches,
but stdenv and a few other packages build fine now.
Diffstat (limited to 'pkgs/development/libraries/fontconfig/config-compat.patch')
-rw-r--r--pkgs/development/libraries/fontconfig/config-compat.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/pkgs/development/libraries/fontconfig/config-compat.patch b/pkgs/development/libraries/fontconfig/config-compat.patch
new file mode 100644
index 00000000000..e86f08fb553
--- /dev/null
+++ b/pkgs/development/libraries/fontconfig/config-compat.patch
@@ -0,0 +1,28 @@
+commit 05c6adf8104b4321d3a3716a7b9feb6bf223ed0c (HEAD, nixpkgs)
+Author: Vladimír Čunát <vcunat@gmail.com>
+Date:   Tue Nov 4 12:24:25 2014 +0100
+
+    add check for /etc/fonts/@configVersion@/fonts.conf
+    
+    It's checked between FONTCONFIG_FILE and the usual /etc/fonts/fonts.conf.
+    Also, hardcode /etc/fonts/fonts.conf to prevent accidental override.
+
+diff --git a/src/fccfg.c b/src/fccfg.c
+index 6377fd7..e9eb10a 100644
+--- a/src/fccfg.c
++++ b/src/fccfg.c
+@@ -2070,8 +2070,13 @@ FcConfigFilename (const FcChar8 *url)
+     if (!url || !*url)
+     {
+ 	url = (FcChar8 *) getenv ("FONTCONFIG_FILE");
++	if (!url) {
++	    static const FcChar8 *cfPath = "/etc/fonts/@configVersion@/fonts.conf";
++	    if (access (cfPath, R_OK) == 0)
++		url = cfPath;
++	}
+ 	if (!url)
+-	    url = (FcChar8 *) FONTCONFIG_FILE;
++	    url = (FcChar8 *) "/etc/fonts/fonts.conf";
+     }
+     file = 0;
+