--- /dev/null
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: toolchain-autoconf.eclass
+# @MAINTAINER:
+# <base-system@gentoo.org>
+# @BLURB: Common code for sys-devel/autoconf ebuilds
+# @DESCRIPTION:
+# This eclass contains the common phase functions migrated from
+# sys-devel/autoconf eblits.
+
+if [[ -z ${_TOOLCHAIN_AUTOCONF_ECLASS} ]]; then
+
+inherit eutils
+
+EXPORT_FUNCTIONS src_prepare src_configure src_install
+
+toolchain-autoconf_src_prepare() {
+ find -name Makefile.in -exec sed -i '/^pkgdatadir/s:$:-@VERSION@:' {} + || die
+
+ [[ ${#PATCHES[@]} -gt 0 ]] && epatch "${PATCHES[@]}"
+}
+
+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
+ # econf updates config.{sub,guess} which forces the manpages
+ # to be regenerated which we dont want to do #146621
+ touch man/*.1
+}
+
+# slot the info pages. do this w/out munging the source so we don't have
+# to depend on texinfo to regen things. #464146 (among others)
+slot_info_pages() {
+ [[ ${SLOT} == "0" ]] && return
+
+ pushd "${ED}"/usr/share/info >/dev/null || die
+ rm -f dir || die
+
+ # Rewrite all the references to other pages.
+ # before: * aclocal-invocation: (automake)aclocal Invocation. Generating aclocal.m4.
+ # after: * aclocal-invocation v1.13: (automake-1.13)aclocal Invocation. Generating aclocal.m4.
+ local p pages=( *.info ) args=()
+ for p in "${pages[@]/%.info}" ; do
+ args+=(
+ -e "/START-INFO-DIR-ENTRY/,/END-INFO-DIR-ENTRY/s|: (${p})| v${SLOT}&|"
+ -e "s:(${p}):(${p}-${SLOT}):g"
+ )
+ done
+ sed -i "${args[@]}" * || die
+
+ # Rewrite all the file references, and rename them in the process.
+ local f d
+ for f in * ; do
+ d=${f/.info/-${SLOT}.info}
+ mv "${f}" "${d}" || die
+ sed -i -e "s:${f}:${d}:g" * || die
+ done
+
+ popd >/dev/null || die
+}
+
+toolchain-autoconf_src_install() {
+ default
+ slot_info_pages
+}
+
+_TOOLCHAIN_AUTOCONF_ECLASS=1
+fi
EAPI="5"
-inherit eutils
+inherit toolchain-autoconf
DESCRIPTION="Used to create autoconfiguration files"
HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html"
"${FILESDIR}"/${P}-test-fixes.patch #146592
)
-if [[ -z ${__EBLITS__} && -n ${FILESDIR} ]] ; then
- source "${FILESDIR}"/eblits/main.eblit || die
-fi
-src_prepare() { eblit-run src_prepare ; }
-src_install() { eblit-run src_install ; }
-
src_configure() {
touch configure # make sure configure is newer than configure.in
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
-inherit eutils
+inherit toolchain-autoconf
DESCRIPTION="Used to create autoconfiguration files"
HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html"
PATCHES=(
"${FILESDIR}"/${P}-more-quotes.patch
)
-
-if [[ -z ${__EBLITS__} && -n ${FILESDIR} ]] ; then
- source "${FILESDIR}"/eblits/main.eblit || die
-fi
-src_prepare() { eblit-run src_prepare ; }
-src_configure() { eblit-run src_configure ; }
-src_install() { eblit-run src_install ; }
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
-inherit eutils
+inherit toolchain-autoconf
DESCRIPTION="Used to create autoconfiguration files"
HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html"
"${FILESDIR}"/${P}-GETMNTENT.patch
)
-if [[ -z ${__EBLITS__} && -n ${FILESDIR} ]] ; then
- source "${FILESDIR}"/eblits/main.eblit || die
-fi
-src_prepare() { eblit-run src_prepare ; }
-src_configure() { eblit-run src_configure ; }
-src_install() { eblit-run src_install ; }
-
src_compile() {
# From configure output:
# Parallel builds via `make -jN' do not work.
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
-inherit eutils
+inherit toolchain-autoconf
DESCRIPTION="Used to create autoconfiguration files"
HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html"
"${FILESDIR}"/${P}-at-keywords.patch
"${FILESDIR}"/${P}-fix-multiline-string.patch #217976
)
-
-if [[ -z ${__EBLITS__} && -n ${FILESDIR} ]] ; then
- source "${FILESDIR}"/eblits/main.eblit || die
-fi
-src_prepare() { eblit-run src_prepare ; }
-src_configure() { eblit-run src_configure ; }
-src_install() { eblit-run src_install ; }
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
-inherit eutils
+inherit toolchain-autoconf
DESCRIPTION="Used to create autoconfiguration files"
HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html"
PATCHES=(
"${FILESDIR}"/${P}-sh.patch #264303
)
-
-if [[ -z ${__EBLITS__} && -n ${FILESDIR} ]] ; then
- source "${FILESDIR}"/eblits/main.eblit || die
-fi
-src_prepare() { eblit-run src_prepare ; }
-src_configure() { eblit-run src_configure ; }
-src_install() { eblit-run src_install ; }
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
+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.xz"
RDEPEND="${DEPEND}
!~sys-devel/${P}:2.5
>=sys-devel/autoconf-wrapper-13"
-
-if [[ -z ${__EBLITS__} && -n ${FILESDIR} ]] ; then
- source "${FILESDIR}"/eblits/main.eblit || die
-fi
-src_prepare() { eblit-run src_prepare ; }
-src_configure() { eblit-run src_configure ; }
-src_install() { eblit-run src_install ; }
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
-inherit eutils
+inherit toolchain-autoconf
DESCRIPTION="Used to create autoconfiguration files"
HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html"
PATCHES=(
"${FILESDIR}"/${P}-AC_TYPE_INT_T.patch #324649
)
-
-if [[ -z ${__EBLITS__} && -n ${FILESDIR} ]] ; then
- source "${FILESDIR}"/eblits/main.eblit || die
-fi
-src_prepare() { eblit-run src_prepare ; }
-src_configure() { eblit-run src_configure ; }
-src_install() { eblit-run src_install ; }
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
+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.xz"
RDEPEND="${DEPEND}
!~sys-devel/${P}:2.5
>=sys-devel/autoconf-wrapper-13"
-
-if [[ -z ${__EBLITS__} && -n ${FILESDIR} ]] ; then
- source "${FILESDIR}"/eblits/main.eblit || die
-fi
-src_prepare() { eblit-run src_prepare ; }
-src_configure() { eblit-run src_configure ; }
-src_install() { eblit-run src_install ; }
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
+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.xz"
RDEPEND="${DEPEND}
!~sys-devel/${P}:2.5
>=sys-devel/autoconf-wrapper-13"
-
-if [[ -z ${__EBLITS__} && -n ${FILESDIR} ]] ; then
- source "${FILESDIR}"/eblits/main.eblit || die
-fi
-src_prepare() { eblit-run src_prepare ; }
-src_configure() { eblit-run src_configure ; }
-src_install() { eblit-run src_install ; }
EAPI="5"
-inherit eutils
-
if [[ ${PV} == "9999" ]] ; then
EGIT_REPO_URI="git://git.savannah.gnu.org/${PN}.git
http://git.savannah.gnu.org/r/${PN}.git"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~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"
[[ ${PV} == "9999" ]] && DEPEND+=" >=sys-apps/texinfo-4.3"
PDEPEND="emacs? ( app-emacs/autoconf-mode )"
-if [[ -z ${__EBLITS__} && -n ${FILESDIR} ]] ; then
- source "${FILESDIR}"/eblits/main.eblit || die
-fi
src_prepare() {
# usr/bin/libtool is provided by binutils-apple, need gnu libtool
[[ ${CHOST} == *-darwin* ]] && \
PATCHES+=( "${FILESDIR}"/${PN}-2.61-darwin.patch )
- eblit-run src_prepare
+ toolchain-autoconf_src_prepare
}
-src_configure() { eblit-run src_configure ; }
-src_install() { eblit-run src_install ; }
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
fi
+inherit toolchain-autoconf
+
DESCRIPTION="Used to create autoconfiguration files"
HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html"
[[ ${PV} == "9999" ]] && DEPEND+=" >=sys-apps/texinfo-4.3"
PDEPEND="emacs? ( app-emacs/autoconf-mode )"
-if [[ -z ${__EBLITS__} && -n ${FILESDIR} ]] ; then
- source "${FILESDIR}"/eblits/main.eblit || die
-fi
-src_prepare() { eblit-run src_prepare ; }
-src_configure() { eblit-run src_configure ; }
-src_install() { eblit-run src_install ; }
-
-eblit-src_prepare-pre() {
+src_prepare() {
# Avoid the "dirty" suffix in the git version by generating it
# before we run later stages which might modify source files.
local ver=$(./build-aux/git-version-gen .tarball-version)
echo "${ver}" > .tarball-version
autoreconf -f -i || die
+
+ toolchain-autoconf_src_prepare
}
+++ /dev/null
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-__EBLITS__="locked-and-loaded"
-
-# eblit-include [--skip] <function> [version]
-eblit-include() {
- local skipable=false
- [[ $1 == "--skip" ]] && skipable=true && shift
- [[ $1 == pkg_* ]] && skipable=true
-
- local e v func=$1 ver=$2
- [[ -z ${func} ]] && die "Usage: eblit-include <function> [version]"
- for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
- e="${FILESDIR}/eblits/${func}${v}.eblit"
- if [[ -e ${e} ]] ; then
- source "${e}"
- return 0
- fi
- done
- ${skipable} && return 0
- die "Could not locate requested eblit '${func}' in ${FILESDIR}/eblits/"
-}
-
-# eblit-run-maybe <function>
-# run the specified function if it is defined
-eblit-run-maybe() {
- [[ $(type -t "$@") == "function" ]] && "$@"
-}
-
-# eblit-run <function> [version]
-# aka: src_unpack() { eblit-run src_unpack ; }
-eblit-run() {
- eblit-include --skip common "${*:2}"
- eblit-include "$@"
- eblit-run-maybe eblit-$1-pre
- eblit-${PN}-$1
- eblit-run-maybe eblit-$1-post
-}
-
-# Copy these into the ebuilds.
-#src_unpack() { eblit-run src_unpack ; }
-#src_prepare() { eblit-run src_prepare ; }
-#src_configure() { eblit-run src_configure ; }
-#src_compile() { eblit-run src_compile ; }
-#src_test() { eblit-run src_test ; }
-#src_install() { eblit-run src_install ; }
+++ /dev/null
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-eblit-autoconf-src_configure() {
- # Disable Emacs in the build system since it is in a separate package.
- export EMACS=no
- econf --program-suffix="-${PV}" || die
- # econf updates config.{sub,guess} which forces the manpages
- # to be regenerated which we dont want to do #146621
- touch man/*.1
-}
+++ /dev/null
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# slot the info pages. do this w/out munging the source so we don't have
-# to depend on texinfo to regen things. #464146 (among others)
-slot_info_pages() {
- [[ ${SLOT} == "0" ]] && return
-
- pushd "${ED}"/usr/share/info >/dev/null
- rm -f dir
-
- # Rewrite all the references to other pages.
- # before: * aclocal-invocation: (automake)aclocal Invocation. Generating aclocal.m4.
- # after: * aclocal-invocation v1.13: (automake-1.13)aclocal Invocation. Generating aclocal.m4.
- local p pages=( *.info ) args=()
- for p in "${pages[@]/%.info}" ; do
- args+=(
- -e "/START-INFO-DIR-ENTRY/,/END-INFO-DIR-ENTRY/s|: (${p})| v${SLOT}&|"
- -e "s:(${p}):(${p}-${SLOT}):g"
- )
- done
- sed -i "${args[@]}" * || die
-
- # Rewrite all the file references, and rename them in the process.
- local f d
- for f in * ; do
- d=${f/.info/-${SLOT}.info}
- mv "${f}" "${d}" || die
- sed -i -e "s:${f}:${d}:g" * || die
- done
-
- popd >/dev/null
-}
-
-eblit-autoconf-src_install() {
- default
- slot_info_pages
-}
+++ /dev/null
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-eblit-autoconf-src_prepare() {
- find -name Makefile.in -exec sed -i '/^pkgdatadir/s:$:-@VERSION@:' {} +
-
- [[ ${#PATCHES[@]} -gt 0 ]] && epatch "${PATCHES[@]}"
-}