The XORG_FONTROOTDIR autoconf macro calls pkg-config to obtain the
fontrootdir path defined in fontutil.pc.
pkgconf automatically prepends SYSROOT to variable values that start
with a "/". For installation paths, we don't want SYSROOT prepended.
Passing --with-fontrootdir bypasses the pkg-config call and avoids the
problem with SYSROOT.
Bug:
https://bugs.gentoo.org/815520
Signed-off-by: Mike Gilbert <
floppym@gentoo.org>
---
eclass/xorg-3.eclass | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/eclass/xorg-3.eclass b/eclass/xorg-3.eclass
index cfa679b766c..41732e289b9 100644
--- a/eclass/xorg-3.eclass
+++ b/eclass/xorg-3.eclass
@@ -275,7 +275,7 @@ xorg-3_src_unpack() {
unpack ${A}
fi
- [[ -n ${FONT_OPTIONS} ]] && einfo "Detected font directory: ${FONT_DIR}"
+ [[ -n ${FONT} ]] && einfo "Detected font directory: ${FONT_DIR}"
}
# @FUNCTION: xorg-3_reconf_source
@@ -317,13 +317,17 @@ xorg-3_src_prepare() {
xorg-3_font_configure() {
debug-print-function ${FUNCNAME} "$@"
+ # Pass --with-fontrootdir to override pkgconf SYSROOT behavior.
+ #
https://bugs.gentoo.org/815520
+ if grep -q -s "with-fontrootdir" "${ECONF_SOURCE:-.}"/configure; then
+ FONT_OPTIONS+=( --with-fontrootdir="${EPREFIX}"/usr/share/fonts )
+ fi
+
if has nls ${IUSE//+} && ! use nls; then
if ! grep -q -s "disable-all-encodings" ${ECONF_SOURCE:-.}/configure; then
die "--disable-al