gcc-toolset-15/enable.in
Siddhesh Poyarekar 6890fadb85 New script gcc-toolset-15-env
Add a new script to replace the `scl enable` command.  Also update the
`enable_devtoolset` macro to instead be called `enable_gcctoolset` and
have it use a new installed script instead of an SCL snippet.

Resolves: RHEL-88743
2025-05-15 12:20:15 -04:00

24 lines
1.0 KiB
Plaintext

# General environment variables
export PATH=%{_bindir}${PATH:+:${PATH}}
export MANPATH=%{_mandir}${MANPATH:+:${MANPATH}}
export INFOPATH=%{_infodir}${INFOPATH:+:${INFOPATH}}
# ??? We probably don't need this anymore.
export PCP_DIR=%{_scl_root}
# bz847911 workaround:
# we need to evaluate rpm's installed run-time % { _libdir }, not rpmbuild time
# or else /etc/ld.so.conf.d files?
rpmlibdir=$(rpm --eval "%%{_libdir}")
# bz1017604: On 64-bit hosts, we should include also the 32-bit library path.
# bz1873882: On 32-bit hosts, we should include also the 64-bit library path.
# bz2027377: Avoid unbound variables
if [ "$rpmlibdir" != "${rpmlibdir/lib64/}" ]; then
rpmlibdir32=":%{_scl_root}${rpmlibdir/lib64/lib}"
rpmlibdir64=
else
rpmlibdir64=":%{_scl_root}${rpmlibdir/lib/lib64}"
rpmlibdir32=
fi
# Prepend the usual /opt/.../usr/lib{64,}.
export LD_LIBRARY_PATH=%{_scl_root}$rpmlibdir$rpmlibdir64$rpmlibdir32${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export PKG_CONFIG_PATH=%{_libdir}/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}