summaryrefslogtreecommitdiff
path: root/eclass/toolchain-autoconf.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-03-28 09:49:11 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-03-28 09:49:11 +0100
commit115dcc7054f5934a2c8e26fd8a8eed5f3e29e9ce (patch)
treec31afe35699960753f76770d6b0b4ea48af9f686 /eclass/toolchain-autoconf.eclass
parente292b671b113c2cc012beddad93a3df4f9410698 (diff)
gentoo auto-resync : 28:03:2023 - 09:49:10
Diffstat (limited to 'eclass/toolchain-autoconf.eclass')
-rw-r--r--eclass/toolchain-autoconf.eclass46
1 files changed, 43 insertions, 3 deletions
diff --git a/eclass/toolchain-autoconf.eclass b/eclass/toolchain-autoconf.eclass
index 2ba27638468e..ed8d5ff1412a 100644
--- a/eclass/toolchain-autoconf.eclass
+++ b/eclass/toolchain-autoconf.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: toolchain-autoconf.eclass
@@ -18,6 +18,20 @@ esac
if [[ -z ${_TOOLCHAIN_AUTOCONF_ECLASS} ]]; then
_TOOLCHAIN_AUTOCONF_ECLASS=1
+# @ECLASS_VARIABLE: TC_AUTOCONF_BREAK_INFOS
+# @DESCRIPTION:
+# Enables slotting logic on the installed info pages. This includes
+# mangling the pages in order to include a version number. Empty by
+# default, and only exists for old ebuild revisions to use. Do not set
+# in new ebuilds. Set to a non-empty value to enable.
+# @DEPRECATED: none
+: "${TC_AUTOCONF_BREAK_INFOS:=}"
+
+# @ECLASS_VARIABLE: TC_AUTOCONF_INFOPATH
+# @DESCRIPTION:
+# Where to install info files if not slotting.
+TC_AUTOCONF_INFOPATH="${EPREFIX}/usr/share/autoconf-${PV}/info"
+
toolchain-autoconf_src_prepare() {
find -name Makefile.in -exec sed -i '/^pkgdatadir/s:$:-@VERSION@:' {} + || die
default
@@ -26,7 +40,15 @@ toolchain-autoconf_src_prepare() {
toolchain-autoconf_src_configure() {
# Disable Emacs in the build system since it is in a separate package.
export EMACS=no
- econf --program-suffix="-${PV}" || die
+ local myconf=(
+ --program-suffix="-${PV}"
+ )
+ if [[ -z "${TC_AUTOCONF_BREAK_INFOS}" && "${SLOT}" != 0 ]]; then
+ myconf+=(
+ --infodir="${TC_AUTOCONF_INFOPATH}"
+ )
+ fi
+ econf "${myconf[@]}" || die
# econf updates config.{sub,guess} which forces the manpages
# to be regenerated which we dont want to do #146621
touch man/*.1
@@ -65,7 +87,25 @@ slot_info_pages() {
toolchain-autoconf_src_install() {
default
- slot_info_pages
+ if [[ -n "${TC_AUTOCONF_BREAK_INFOS}" ]]; then
+ slot_info_pages
+ else
+ rm -f dir || die
+
+ local major="$(ver_cut 1)"
+ local minor="$(ver_cut 2)"
+ local idx="$((99999-(major*1000+minor)))"
+ newenvd - "06autoconf${idx}" <<-EOF
+ INFOPATH="${TC_AUTOCONF_INFOPATH}"
+ EOF
+
+ pushd "${D}/${TC_AUTOCONF_INFOPATH}" >/dev/null || die
+ for f in *.info*; do
+ # Install convenience aliases for versioned Autoconf pages.
+ ln -s "$f" "${f/./-${PV}.}" || die
+ done
+ popd >/dev/null || die
+ fi
}
fi