Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sys-devel/{autoconf,automake}: slot Info pages in INFOPATH rather than by mangling them #30355

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
46 changes: 43 additions & 3 deletions eclass/toolchain-autoconf.eclass
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion sys-devel/autoconf/autoconf-2.13-r2.ebuild
Original file line number Diff line number Diff line change
@@ -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

EAPI=7
Expand Down Expand Up @@ -33,6 +33,8 @@ PATCHES=(
"${FILESDIR}"/${PN}-2.13-perl-5.26.patch
)

TC_AUTOCONF_BREAK_INFOS=yes

src_configure() {
# make sure configure is newer than configure.in
touch configure || die
Expand Down
4 changes: 3 additions & 1 deletion sys-devel/autoconf/autoconf-2.13-r7.ebuild
Original file line number Diff line number Diff line change
@@ -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

EAPI=7
Expand Down Expand Up @@ -35,6 +35,8 @@ PATCHES=(
"${FILESDIR}"/${P}-Clang-16-fixes-for-various-tests.patch
)

TC_AUTOCONF_BREAK_INFOS=yes

src_configure() {
# make sure configure is newer than configure.in
touch configure || die
Expand Down
59 changes: 59 additions & 0 deletions sys-devel/autoconf/autoconf-2.13-r8.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit toolchain-autoconf

DESCRIPTION="Used to create autoconfiguration files"
HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html"
SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="${PV:0:3}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
IUSE="test"
RESTRICT="!test? ( test )"

BDEPEND="
dev-lang/perl
sys-devel/m4
test? ( dev-util/dejagnu )
"
RDEPEND="
${BDEPEND}
sys-apps/texinfo
>=sys-devel/autoconf-wrapper-13
"

PATCHES=(
"${FILESDIR}"/${P}-gentoo.patch
"${FILESDIR}"/${P}-destdir.patch
"${FILESDIR}"/${P}-test-fixes.patch #146592
"${FILESDIR}"/${P}-perl-5.26.patch
"${FILESDIR}"/${P}-K-R-decls-clang.patch
"${FILESDIR}"/${P}-Clang-16-fixes-for-various-tests.patch
)

src_configure() {
# make sure configure is newer than configure.in
touch configure || die

# need to include --exec-prefix and --bindir or our
# DESTDIR patch will trigger sandbox hate :(
#
# need to force locale to C to avoid bugs in the old
# configure script breaking the install paths #351982
#
# force to `awk` so that we don't encode another awk that
# happens to currently be installed, but might later be
# uninstalled (like mawk). same for m4.
ac_cv_path_M4="m4" \
ac_cv_prog_AWK="awk" \
LC_ALL=C \
econf \
--exec-prefix="${EPREFIX}"/usr \
--bindir="${EPREFIX}"/usr/bin \
--program-suffix="-${PV}" \
--infodir="${TC_AUTOCONF_INFOPATH}"
}
4 changes: 3 additions & 1 deletion sys-devel/autoconf/autoconf-2.69-r5.ebuild
Original file line number Diff line number Diff line change
@@ -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

EAPI=7
Expand Down Expand Up @@ -41,6 +41,8 @@ PATCHES=(
"${WORKDIR}"/patches/${P}-runstatedir_info.patch
)

TC_AUTOCONF_BREAK_INFOS=yes

src_prepare() {
# usr/bin/libtool is provided by binutils-apple, need gnu libtool
if [[ ${CHOST} == *-darwin* ]] ; then
Expand Down
4 changes: 3 additions & 1 deletion sys-devel/autoconf/autoconf-2.69-r8.ebuild
Original file line number Diff line number Diff line change
@@ -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

EAPI=7
Expand Down Expand Up @@ -46,6 +46,8 @@ PATCHES=(
"${WORKDIR}"/patches/${P}-texinfo.patch
)

TC_AUTOCONF_BREAK_INFOS=yes

src_prepare() {
# usr/bin/libtool is provided by binutils-apple, need gnu libtool
if [[ ${CHOST} == *-darwin* ]] ; then
Expand Down
63 changes: 63 additions & 0 deletions sys-devel/autoconf/autoconf-2.69-r9.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://git.savannah.gnu.org/git/autoconf.git"
inherit git-r3
else
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
ftp://alpha.gnu.org/pub/gnu/${PN}/${P}.tar.xz
https://dev.gentoo.org/~polynomial-c/dist/${P}-runstatedir_patches.tar.xz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi

inherit toolchain-autoconf

DESCRIPTION="Used to create autoconfiguration files"
HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html"

LICENSE="GPL-3+"
SLOT="${PV}"
IUSE="emacs"

BDEPEND="
>=sys-devel/m4-1.4.16
>=dev-lang/perl-5.6
"
RDEPEND="
${BDEPEND}
>=sys-devel/autoconf-wrapper-13
!~sys-devel/${P}:2.5
"

[[ ${PV} == 9999 ]] && BDEPEND+=" >=sys-apps/texinfo-4.3"

PDEPEND="emacs? ( app-emacs/autoconf-mode )"

PATCHES=(
"${FILESDIR}"/${PN}-2.69-perl-5.26.patch
"${FILESDIR}"/${P}-fix-libtool-test.patch
"${FILESDIR}"/${PN}-2.69-perl-5.26-2.patch
"${FILESDIR}"/${P}-make-tests-bash5-compatible.patch
"${FILESDIR}"/${P}-K-R-decls-clang.patch

"${WORKDIR}"/patches/${P}-texinfo.patch
)

src_prepare() {
# usr/bin/libtool is provided by binutils-apple, need gnu libtool
if [[ ${CHOST} == *-darwin* ]] ; then
PATCHES+=( "${FILESDIR}"/${PN}-2.61-darwin.patch )
fi

# Save timestamp to avoid later makeinfo call
touch -r doc/{,old_}autoconf.texi || die

toolchain-autoconf_src_prepare

# Restore timestamp to avoid makeinfo call
# We already have an up to date autoconf.info page at this point.
touch -r doc/{old_,}autoconf.texi || die
}
4 changes: 3 additions & 1 deletion sys-devel/autoconf/autoconf-2.71-r1.ebuild
Original file line number Diff line number Diff line change
@@ -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

EAPI=7
Expand Down Expand Up @@ -43,6 +43,8 @@ PDEPEND="emacs? ( app-emacs/autoconf-mode )"

PATCHES=( "${FILESDIR}/${P}-time.patch" )

TC_AUTOCONF_BREAK_INFOS=yes

src_prepare() {
# usr/bin/libtool is provided by binutils-apple, need gnu libtool
if [[ ${CHOST} == *-darwin* ]] ; then
Expand Down
4 changes: 3 additions & 1 deletion sys-devel/autoconf/autoconf-2.71-r5.ebuild
Original file line number Diff line number Diff line change
@@ -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

EAPI=7
Expand Down Expand Up @@ -50,6 +50,8 @@ PATCHES=(
"${FILESDIR}"/${P}-K-R-decls-clang-deux.patch
)

TC_AUTOCONF_BREAK_INFOS=yes

src_prepare() {
# usr/bin/libtool is provided by binutils-apple, need gnu libtool
if [[ ${CHOST} == *-darwin* ]] ; then
Expand Down
88 changes: 88 additions & 0 deletions sys-devel/autoconf/autoconf-2.71-r6.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://git.savannah.gnu.org/git/autoconf.git"
inherit git-r3
else
# For _beta handling replace with real version number
MY_PV="${PV}"
MY_P="${PN}-${MY_PV}"
#PATCH_TARBALL_NAME="${PN}-2.70-patches-01"
SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.xz
https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz"
#SRC_URI+=" https://dev.gentoo.org/~polynomial-c/${PATCH_TARBALL_NAME}.tar.xz"

if ! [[ ${PV} == *_beta* ]] ; then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
S="${WORKDIR}"/${MY_P}
fi

inherit toolchain-autoconf

DESCRIPTION="Used to create autoconfiguration files"
HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html"

LICENSE="GPL-3+"
SLOT="${PV/_*}"
IUSE="emacs"

# for 2.71, our Perl time resolution patch changes our min Perl from 5.6
# (vanilla upstream for 2.71) to 5.8.
BDEPEND=">=sys-devel/m4-1.4.16
>=dev-lang/perl-5.8"
RDEPEND="${BDEPEND}
>=sys-devel/autoconf-wrapper-15
sys-devel/gnuconfig
!~sys-devel/${P}:2.5"
[[ ${PV} == 9999 ]] && BDEPEND+=" >=sys-apps/texinfo-4.3"
PDEPEND="emacs? ( app-emacs/autoconf-mode )"

PATCHES=(
"${FILESDIR}"/${P}-AC_LANG_CALL_C_cxx.patch
"${FILESDIR}"/${P}-time.patch
"${FILESDIR}"/${P}-AC_C_BIGENDIAN-lto.patch
"${FILESDIR}"/${P}-K-R-decls-clang.patch
"${FILESDIR}"/${P}-make-4.4.patch
"${FILESDIR}"/${P}-K-R-decls-clang-deux.patch
)

src_prepare() {
# usr/bin/libtool is provided by binutils-apple, need gnu libtool
if [[ ${CHOST} == *-darwin* ]] ; then
PATCHES+=( "${FILESDIR}"/${PN}-2.71-darwin.patch )
fi

# Save timestamp to avoid later makeinfo call
touch -r doc/{,old_}autoconf.texi || die

local pdir
for pdir in "${WORKDIR}"/{upstream_,}patches ; do
if [[ -d "${pdir}" ]] ; then
eapply ${pdir}
fi
done

toolchain-autoconf_src_prepare

# Restore timestamp to avoid makeinfo call
# We already have an up to date autoconf.info page at this point.
touch -r doc/{old_,}autoconf.texi || die
}

src_test() {
emake check
}

src_install() {
toolchain-autoconf_src_install

local f
for f in config.{guess,sub} ; do
ln -fs ../../gnuconfig/${f} \
"${ED}"/usr/share/autoconf-*/build-aux/${f} || die
done
}