[oe-commits] Richard Tollerton : xorg-font-common: fix sysroot injection for encoding maps

git at git.openembedded.org git at git.openembedded.org
Sat Feb 21 22:06:04 UTC 2015


Module: openembedded-core.git
Branch: master
Commit: 5cd320d8d21cd784b32f12a6944dc647a75abf94
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=5cd320d8d21cd784b32f12a6944dc647a75abf94

Author: Richard Tollerton <rich.tollerton at ni.com>
Date:   Fri Feb 20 13:02:35 2015 -0600

xorg-font-common: fix sysroot injection for encoding maps

The xorg font builds use `pkg-config --variable=mapdir fontutil` to
locate encoding maps. This variable ought to be sysroot-relative, but
neither pkg-config nor font-util nor the fonts themselves provide any
facility to add the sysroot back in.

We're presently adding the sysroot by by twiddling MAPFILES_PATH in
configure.ac. This is broken; it's actually defined in aclocal.m4,
because the definition is provided by fontutil.m4. Another (more
speculative) criticism is that it also hardcodes a build-specific
absolute path into builds which might (incorrectly) encode it into
target-installable packages.

A somewhat more robust, focused, and clear solution is to override
UTIL_DIR on the make command line. (UTIL_DIR, not MAPFILES_PATH, is what
is actually referenced in the build.)

Signed-off-by: Richard Tollerton <rich.tollerton at ni.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>

---

 meta/recipes-graphics/xorg-font/xorg-font-common.inc | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/meta/recipes-graphics/xorg-font/xorg-font-common.inc b/meta/recipes-graphics/xorg-font/xorg-font-common.inc
index 55adde3..d3b995a 100644
--- a/meta/recipes-graphics/xorg-font/xorg-font-common.inc
+++ b/meta/recipes-graphics/xorg-font/xorg-font-common.inc
@@ -15,13 +15,7 @@ S = "${WORKDIR}/${XORG_PN}-${PV}"
 
 inherit autotools pkgconfig
 
-EXTRA_OEMAKE += "FCCACHE=/bin/true"
-
-do_configure_prepend() {
-        if [ -f "${S}"/configure.ac ] ; then
-                sed -i "s#^MAPFILES_PATH=.*#MAPFILES_PATH=\"${STAGING_DIR_TARGET}/\$(pkg-config --variable=mapdir fontutil)\"#g" "${S}"/configure.ac
-        fi
-}
+EXTRA_OEMAKE += "FCCACHE=/bin/true UTIL_DIR=${STAGING_DIR_TARGET}\$\(MAPFILES_PATH\)"
 
 do_install_append() {
 	find ${D}${libdir}/X11/fonts -type f -name fonts.dir | xargs rm -f



More information about the Openembedded-commits mailing list