diff options
author | 2022-12-26 10:14:34 +0000 | |
---|---|---|
committer | 2022-12-28 19:11:59 +0000 | |
commit | fc3edfcd1cc277a3457c0d17041f74452b4d3465 (patch) | |
tree | b4a897372ecbcfdb6dc943b7caa99ede9da6826b | |
parent | Read CHOST with portageq from EROOT and not / (diff) | |
download | gcc-config-fc3edfcd1cc277a3457c0d17041f74452b4d3465.tar.gz gcc-config-fc3edfcd1cc277a3457c0d17041f74452b4d3465.tar.bz2 gcc-config-fc3edfcd1cc277a3457c0d17041f74452b4d3465.zip |
Read LIBDIR with portageq from EROOT instead of hardcoding the / valuev2.9
We fall back to the hardcoded / value if that fails.
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Closes: https://github.com/gentoo/gcc-config/pull/1
Signed-off-by: Sam James <sam@gentoo.org>
-rwxr-xr-x | gcc-config | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -41,7 +41,10 @@ fi PV="@PV@" [[ ${PV} == @*@ ]] && PV="git" -GENTOO_LIBDIR="@GENTOO_LIBDIR@" + +ABI=$(portageq envvar DEFAULT_ABI 2>/dev/null) +GENTOO_LIBDIR=$(portageq envvar LIBDIR_"${ABI}" 2>/dev/null) +[[ $? != 0 || -z ${GENTOO_LIBDIR} ]] && GENTOO_LIBDIR="@GENTOO_LIBDIR@" [[ ${GENTOO_LIBDIR} == @*@ ]] && GENTOO_LIBDIR="lib" usage() { |