Gentoo Archives: gentoo-dev

From: Mike Gilbert <floppym@g.o>
To: gentoo-dev@l.g.o
Cc: x11@g.o, Mike Gilbert <floppym@g.o>
Subject: [gentoo-dev] [PATCH 1/3] xorg-3.eclass: pass --with-fontrootdir to configure
Date: Fri, 01 Oct 2021 17:50:13
Message-Id: 20211001174950.1087880-1-floppym@gentoo.org
1 The XORG_FONTROOTDIR autoconf macro calls pkg-config to obtain the
2 fontrootdir path defined in fontutil.pc.
3
4 pkgconf automatically prepends SYSROOT to variable values that start
5 with a "/". For installation paths, we don't want SYSROOT prepended.
6
7 Passing --with-fontrootdir bypasses the pkg-config call and avoids the
8 problem with SYSROOT.
9
10 Bug: https://bugs.gentoo.org/815520
11 Signed-off-by: Mike Gilbert <floppym@g.o>
12 ---
13 eclass/xorg-3.eclass | 15 ++++++++++-----
14 1 file changed, 10 insertions(+), 5 deletions(-)
15
16 diff --git a/eclass/xorg-3.eclass b/eclass/xorg-3.eclass
17 index cfa679b766c..41732e289b9 100644
18 --- a/eclass/xorg-3.eclass
19 +++ b/eclass/xorg-3.eclass
20 @@ -275,7 +275,7 @@ xorg-3_src_unpack() {
21 unpack ${A}
22 fi
23
24 - [[ -n ${FONT_OPTIONS} ]] && einfo "Detected font directory: ${FONT_DIR}"
25 + [[ -n ${FONT} ]] && einfo "Detected font directory: ${FONT_DIR}"
26 }
27
28 # @FUNCTION: xorg-3_reconf_source
29 @@ -317,13 +317,17 @@ xorg-3_src_prepare() {
30 xorg-3_font_configure() {
31 debug-print-function ${FUNCNAME} "$@"
32
33 + # Pass --with-fontrootdir to override pkgconf SYSROOT behavior.
34 + # https://bugs.gentoo.org/815520
35 + if grep -q -s "with-fontrootdir" "${ECONF_SOURCE:-.}"/configure; then
36 + FONT_OPTIONS+=( --with-fontrootdir="${EPREFIX}"/usr/share/fonts )
37 + fi
38 +
39 if has nls ${IUSE//+} && ! use nls; then
40 if ! grep -q -s "disable-all-encodings" ${ECONF_SOURCE:-.}/configure; then
41 die "--disable-all-encodings option not available in configure"
42 fi
43 - FONT_OPTIONS+="
44 - --disable-all-encodings
45 - --enable-iso8859-1"
46 + FONT_OPTIONS+=( --disable-all-encodings --enable-iso8859-1 )
47 fi
48 }
49
50 @@ -365,6 +369,7 @@ xorg-3_src_configure() {
51 # @DEFAULT_UNSET
52 local xorgconfadd=("${XORG_CONFIGURE_OPTIONS[@]}")
53
54 + local FONT_OPTIONS=()
55 [[ -n "${FONT}" ]] && xorg-3_font_configure
56
57 # Check if package supports disabling of dep tracking
58 @@ -388,7 +393,7 @@ xorg-3_src_configure() {
59 ${dep_track}
60 ${selective_werror}
61 ${no_static}
62 - ${FONT_OPTIONS}
63 + "${FONT_OPTIONS[@]}"
64 "${xorgconfadd[@]}"
65 )
66
67 --
68 2.33.0

Replies