From 20ef145c9b4eb3b5fd1258d02745482b3b2e1bde Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lawrence=20Vel=C3=A1zquez?= <larryv@macports.org>
Date: Mon, 2 Feb 2015 02:20:48 -0500
Subject: [PATCH 10/16] (MP) fontconfig: Use our port's configuration

FC_CACHEDIR and FONTCONFIG_PATH are preprocessed into some of the build
products, although I'm not sure if the static library is one of them.
I think the font paths are only stored in the generated fonts.conf
(which the build discards), but let's maintain consistency with the port
just in case.
---
 contrib/fontconfig/module.defs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/contrib/fontconfig/module.defs b/contrib/fontconfig/module.defs
index 0bf9421..da8a1f7 100644
--- a/contrib/fontconfig/module.defs
+++ b/contrib/fontconfig/module.defs
@@ -85,10 +85,10 @@ ifeq (darwin,$(BUILD.system))
 FONTCONFIG.CONFIGURE.extra += \
     LIBXML2_LIBS="-L$(call fn.ABSOLUTE,$(CONTRIB.build/))lib -lxml2" \
     LIBXML2_CFLAGS="-I$(call fn.ABSOLUTE,$(CONTRIB.build/))include/libxml2" \
-    --with-fcpath=/usr/X11/lib/X11/fontconfig \
-    --with-cache-dir=~/Library/Caches/fontconfig \
+    --with-fcpath=$(PREFIX)/etc/fonts \
+    --with-cache-dir=$(PREFIX)/var/cache/fontconfig \
     --with-default-fonts=/Library/Fonts \
-    --with-add-fonts=/System/Library/Fonts,~/Library/Fonts
+    --with-add-fonts=/usr/X11/lib/X11/fonts,$(PREFIX)/share/fonts,/Network/Library/Fonts,/System/Library/Fonts
 else ifeq (linux,$(BUILD.system))
 FONTCONFIG.CONFIGURE.extra += \
     --with-fcpath=/etc/fonts \
-- 
2.3.0

