mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-15 23:51:35 +01:00
eclass/toolchain-autoconf: Sync with Gentoo
It's from Gentoo commit 3090afd2a0f41d9183f2dbb580df7df9c6e3a0e3.
This commit is contained in:
parent
5267f20799
commit
b05f9897d7
@ -30,7 +30,14 @@ _TOOLCHAIN_AUTOCONF_ECLASS=1
|
|||||||
# @ECLASS_VARIABLE: TC_AUTOCONF_INFOPATH
|
# @ECLASS_VARIABLE: TC_AUTOCONF_INFOPATH
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Where to install info files if not slotting.
|
# Where to install info files if not slotting.
|
||||||
TC_AUTOCONF_INFOPATH="${EPREFIX}/usr/share/autoconf-${PV}/info"
|
TC_AUTOCONF_INFOPATH="${EPREFIX}/usr/share/${P}/info"
|
||||||
|
|
||||||
|
# @ECLASS_VARIABLE: TC_AUTOCONF_ENVPREFIX
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Prefix number for env.d files produced by this eclass. Defaults to
|
||||||
|
# 06. Note that the generated env.d filename format is
|
||||||
|
# "${TC_AUTOCONF_ENVPREFIX}${PN}$((99999-(major*1000+minor)))"
|
||||||
|
: "${TC_AUTOCONF_ENVPREFIX:=06}"
|
||||||
|
|
||||||
toolchain-autoconf_src_prepare() {
|
toolchain-autoconf_src_prepare() {
|
||||||
find -name Makefile.in -exec sed -i '/^pkgdatadir/s:$:-@VERSION@:' {} + || die
|
find -name Makefile.in -exec sed -i '/^pkgdatadir/s:$:-@VERSION@:' {} + || die
|
||||||
@ -40,15 +47,18 @@ toolchain-autoconf_src_prepare() {
|
|||||||
toolchain-autoconf_src_configure() {
|
toolchain-autoconf_src_configure() {
|
||||||
# Disable Emacs in the build system since it is in a separate package.
|
# Disable Emacs in the build system since it is in a separate package.
|
||||||
export EMACS=no
|
export EMACS=no
|
||||||
|
|
||||||
|
MY_P="${P#autoconf-}"
|
||||||
|
|
||||||
local myconf=(
|
local myconf=(
|
||||||
--program-suffix="-${PV}"
|
--program-suffix="-${MY_P}"
|
||||||
)
|
)
|
||||||
if [[ -z "${TC_AUTOCONF_BREAK_INFOS}" && "${SLOT}" != 0 ]]; then
|
if [[ -z "${TC_AUTOCONF_BREAK_INFOS}" && "${SLOT}" != 0 ]]; then
|
||||||
myconf+=(
|
myconf+=(
|
||||||
--infodir="${TC_AUTOCONF_INFOPATH}"
|
--infodir="${TC_AUTOCONF_INFOPATH}"
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
econf "${myconf[@]}" || die
|
econf "${myconf[@]}" "${@}" || die
|
||||||
# econf updates config.{sub,guess} which forces the manpages
|
# econf updates config.{sub,guess} which forces the manpages
|
||||||
# to be regenerated which we dont want to do #146621
|
# to be regenerated which we dont want to do #146621
|
||||||
touch man/*.1
|
touch man/*.1
|
||||||
@ -95,7 +105,7 @@ toolchain-autoconf_src_install() {
|
|||||||
local major="$(ver_cut 1)"
|
local major="$(ver_cut 1)"
|
||||||
local minor="$(ver_cut 2)"
|
local minor="$(ver_cut 2)"
|
||||||
local idx="$((99999-(major*1000+minor)))"
|
local idx="$((99999-(major*1000+minor)))"
|
||||||
newenvd - "06autoconf${idx}" <<-EOF
|
newenvd - "${TC_AUTOCONF_ENVPREFIX}${PN}${idx}" <<-EOF
|
||||||
INFOPATH="${TC_AUTOCONF_INFOPATH}"
|
INFOPATH="${TC_AUTOCONF_INFOPATH}"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user