summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-11-10 13:21:36 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-11-10 13:21:36 +0000
commit77398e424e45d9e98c1cef3c43bdadb9d56e81ef (patch)
tree5aeffd3fc7b92fc615bd2c222fa8831aeda1925b /eclass
parentbd4aeefe33e63f613512604e47bfca7b2187697d (diff)
gentoo resync : 10.11.2019
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin37628 -> 37611 bytes
-rw-r--r--eclass/autotools.eclass5
-rw-r--r--eclass/ruby-fakegem.eclass4
-rw-r--r--eclass/ruby-ng.eclass5
-rwxr-xr-xeclass/tests/toolchain-funcs.sh24
-rw-r--r--eclass/texlive-common.eclass4
-rw-r--r--eclass/texlive-module.eclass58
-rw-r--r--eclass/toolchain-binutils.eclass3
-rw-r--r--eclass/toolchain-funcs.eclass15
-rw-r--r--eclass/toolchain.eclass53
10 files changed, 71 insertions, 100 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index 593e355d8ccb..4644cd9185e9 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
index 9143aa454d0d..9df0e1b93663 100644
--- a/eclass/autotools.eclass
+++ b/eclass/autotools.eclass
@@ -109,10 +109,7 @@ if [[ -n ${WANT_LIBTOOL} ]] ; then
export WANT_LIBTOOL
fi
-# Force people (nicely) to upgrade to a newer version of gettext as
-# older ones are known to be crappy. #496454
-AUTOTOOLS_DEPEND="!<sys-devel/gettext-0.18.1.1-r3
- ${_automake_atom}
+AUTOTOOLS_DEPEND="${_automake_atom}
${_autoconf_atom}
${_libtool_atom}"
RDEPEND=""
diff --git a/eclass/ruby-fakegem.eclass b/eclass/ruby-fakegem.eclass
index e600b02b9649..d0956082f816 100644
--- a/eclass/ruby-fakegem.eclass
+++ b/eclass/ruby-fakegem.eclass
@@ -155,20 +155,24 @@ esac
case ${RUBY_FAKEGEM_RECIPE_TEST} in
rake)
IUSE+=" test"
+ RESTRICT+=" !test? ( test )"
ruby_add_bdepend "test? ( dev-ruby/rake )"
;;
rspec)
IUSE+=" test"
+ RESTRICT+=" !test? ( test )"
# Also require a new enough rspec-core version that installs the
# rspec-2 wrapper.
ruby_add_bdepend "test? ( dev-ruby/rspec:2 >=dev-ruby/rspec-core-2.14.8-r2 )"
;;
rspec3)
IUSE+=" test"
+ RESTRICT+=" !test? ( test )"
ruby_add_bdepend "test? ( dev-ruby/rspec:3 )"
;;
cucumber)
IUSE+=" test"
+ RESTRICT+=" !test? ( test )"
ruby_add_bdepend "test? ( dev-util/cucumber )"
;;
*)
diff --git a/eclass/ruby-ng.eclass b/eclass/ruby-ng.eclass
index dd9d3f2418ca..db701d81f4fc 100644
--- a/eclass/ruby-ng.eclass
+++ b/eclass/ruby-ng.eclass
@@ -234,7 +234,10 @@ ruby_add_rdepend() {
4|5|6) DEPEND="${DEPEND} test? ( ${dependency} )" ;;
*) BDEPEND="${BDEPEND} test? ( ${dependency} )" ;;
esac
- has test "$IUSE" || IUSE="${IUSE} test"
+ if ! has test "$IUSE"; then
+ IUSE+=" test"
+ RESTRICT+=" !test? ( test )"
+ fi
}
# @FUNCTION: ruby_add_bdepend
diff --git a/eclass/tests/toolchain-funcs.sh b/eclass/tests/toolchain-funcs.sh
index bcf57f78201a..79ba6fa407b5 100755
--- a/eclass/tests/toolchain-funcs.sh
+++ b/eclass/tests/toolchain-funcs.sh
@@ -172,4 +172,28 @@ if type -P pathcc &>/dev/null; then
tend $?
fi
+for compiler in gcc clang; do
+ if type -P ${compielr} &>/dev/null; then
+ tbegin "tc-cpp-is-true ($compiler, defined)"
+ (
+ export CC=${compiler}
+ tc-cpp-is-true "defined(SOME_DEFINED_SYMBOL)" -DSOME_DEFINED_SYMBOL
+ )
+ tend $?
+ tbegin "tc-cpp-is-true ($compiler, not defined)"
+ (
+ export CC=${compiler}
+ ! tc-cpp-is-true "defined(SOME_UNDEFINED_SYMBOL)"
+ )
+ tend $?
+
+ tbegin "tc-cpp-is-true ($compiler, defined on -ggdb3)"
+ (
+ export CC=${compiler}
+ tc-cpp-is-true "defined(SOME_DEFINED_SYMBOL)" -DSOME_DEFINED_SYMBOL -ggdb3
+ )
+ tend $?
+ fi
+done
+
texit
diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass
index e9a2eee65bd3..593e88558710 100644
--- a/eclass/texlive-common.eclass
+++ b/eclass/texlive-common.eclass
@@ -6,7 +6,7 @@
# tex@gentoo.org
# @AUTHOR:
# Original Author: Alexis Ballier <aballier@gentoo.org>
-# @SUPPORTED_EAPIS: 3 4 5 6 7
+# @SUPPORTED_EAPIS: 7
# @BLURB: Provide various functions used by both texlive-core and texlive modules
# @DESCRIPTION:
# Purpose: Provide various functions used by both texlive-core and texlive
@@ -15,7 +15,7 @@
# Note that this eclass *must* not assume the presence of any standard tex tool
case "${EAPI:-0}" in
- 0|1|2)
+ 0|1|2|3|4|5|6)
die "EAPI='${EAPI}' is not supported anymore"
;;
*)
diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
index bd338ee625c3..52b26cdca4dc 100644
--- a/eclass/texlive-module.eclass
+++ b/eclass/texlive-module.eclass
@@ -6,7 +6,7 @@
# tex@gentoo.org
# @AUTHOR:
# Original Author: Alexis Ballier <aballier@gentoo.org>
-# @SUPPORTED_EAPIS: 3 4 5 6 7
+# @SUPPORTED_EAPIS: 7
# @BLURB: Provide generic install functions so that modular texlive's texmf ebuild will only have to inherit this eclass
# @DESCRIPTION:
# Purpose: Provide generic install functions so that modular texlive's texmf ebuilds will
@@ -24,7 +24,7 @@
# bash array.
# @ECLASS-VARIABLE: TEXLIVE_MODULE_CONTENTS
-# @REQUIRED
+# @REQUIRED
# @DESCRIPTION:
# The list of packages that will be installed. This variable will be expanded to
# SRC_URI:
@@ -68,17 +68,10 @@
# Information to display about the package.
# e.g. for enabling/disabling a feature
-# @ECLASS-VARIABLE: PATCHES
-# @DESCRIPTION:
-# Array variable specifying any patches to be applied.
-
case "${EAPI:-0}" in
- 0|1|2)
+ 0|1|2|3|4|5|6)
die "EAPI='${EAPI}' is not supported anymore"
;;
- 3|4|5)
- inherit texlive-common eutils
- ;;
*)
inherit texlive-common
;;
@@ -92,19 +85,12 @@ IUSE="source"
# Starting from TeX Live 2009, upstream provides .tar.xz modules.
PKGEXT=tar.xz
-case "${EAPI:-0}" in
- 0|1|2|3|4|5|6)
- DEPEND="${COMMON_DEPEND}
- app-arch/xz-utils"
- ;;
- *)
- # We do not need anything from SYSROOT:
- # Everything is built from the texlive install in /
- # Generated files are noarch
- BDEPEND="${COMMON_DEPEND}
- app-arch/xz-utils"
- ;;
-esac
+
+# We do not need anything from SYSROOT:
+# Everything is built from the texlive install in /
+# Generated files are noarch
+BDEPEND="${COMMON_DEPEND}
+ app-arch/xz-utils"
for i in ${TEXLIVE_MODULE_CONTENTS}; do
SRC_URI="${SRC_URI} mirror://gentoo/texlive-module-${i}-${PV}.${PKGEXT}"
@@ -164,22 +150,6 @@ texlive-module_src_unpack() {
done
}
-# @FUNCTION: texlive-module_src_prepare
-# @DESCRIPTION:
-# Apply patches from the PATCHES array and user patches, if any.
-
-texlive-module_src_prepare() {
- case "${EAPI:-0}" in
- 0|1|2|3|4|5)
- [[ ${#PATCHES[@]} -gt 0 ]] && epatch "${PATCHES[@]}"
- epatch_user
- ;;
- *)
- die "texlive-module_src_prepare is not to be used in EAPI ${EAPI}"
- ;;
- esac
-}
-
# @FUNCTION: texlive-module_add_format
# @DESCRIPTION:
# Creates/appends to a format.${PN}.cnf file for fmtutil.
@@ -429,12 +399,4 @@ texlive-module_pkg_postrm() {
etexmf-update
}
-case "${EAPI:-0}" in
- 0|1|2|3|4|5)
- EXPORT_FUNCTIONS src_unpack src_prepare src_compile src_install \
- pkg_postinst pkg_postrm
- ;;
- *)
- EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_postinst pkg_postrm
- ;;
-esac
+EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_postinst pkg_postrm
diff --git a/eclass/toolchain-binutils.eclass b/eclass/toolchain-binutils.eclass
index 0b691d822762..303eeb4092fd 100644
--- a/eclass/toolchain-binutils.eclass
+++ b/eclass/toolchain-binutils.eclass
@@ -99,6 +99,9 @@ DEPEND="${RDEPEND}
nls? ( sys-devel/gettext )
sys-devel/flex
virtual/yacc"
+
+RESTRICT="!test? ( test )"
+
if is_cross ; then
# The build assumes the host has libiberty and such when cross-compiling
# its build tools. We should probably make binutils itself build a local
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index e358d484417a..1bc6cbbc1088 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -207,14 +207,13 @@ tc-cpp-is-true() {
local CONDITION=${1}
shift
- local RESULT=$($(tc-getTARGET_CPP) "${@}" -P - <<-EOF 2>/dev/null
- #if ${CONDITION}
- true
- #endif
- EOF
- )
-
- [[ ${RESULT} == true ]]
+ $(tc-getTARGET_CPP) "${@}" -P - <<-EOF >/dev/null 2>&1
+ #if ${CONDITION}
+ true
+ #else
+ #error false
+ #endif
+ EOF
}
# @FUNCTION: tc-detect-is-softfloat
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index d2bfa6ab2f1d..99643eafdd0f 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -30,16 +30,6 @@ case ${EAPI:-0} in
*) die "I don't speak EAPI ${EAPI}." ;;
esac
-tc_supports_dostrip() {
- case ${EAPI:-0} in
- 5*|6) return 1 ;;
- 7) return 0 ;;
- *) die "Update apply_patches() for ${EAPI}." ;;
- esac
-}
-
-tc_supports_dostrip || RESTRICT="strip" # cross-compilers need controlled stripping
-
EXPORT_FUNCTIONS pkg_pretend pkg_setup src_unpack src_prepare src_configure \
src_compile src_test src_install pkg_postinst pkg_postrm
@@ -137,15 +127,18 @@ else
LICENSE="GPL-2+ LGPL-2.1+ FDL-1.1+"
fi
-if tc_version_is_at_least 8.3; then
- GCC_EBUILD_TEST_FLAG='test'
-else
- # Don't force USE regression-test->test change on every
- # gcc ebuild just yet. Let's do the change when >=gcc-8.3
- # is commonly used as a main compiler.
- GCC_EBUILD_TEST_FLAG='regression-test'
-fi
-IUSE="${GCC_EBUILD_TEST_FLAG} vanilla +nls"
+IUSE="test vanilla +nls"
+RESTRICT="!test? ( test )"
+
+tc_supports_dostrip() {
+ case ${EAPI:-0} in
+ 5*|6) return 1 ;;
+ 7) return 0 ;;
+ *) die "Update apply_patches() for ${EAPI}." ;;
+ esac
+}
+
+tc_supports_dostrip || RESTRICT+=" strip" # cross-compilers need controlled stripping
TC_FEATURES=()
@@ -234,7 +227,7 @@ DEPEND="${RDEPEND}
>=sys-devel/bison-1.875
>=sys-devel/flex-2.5.4
nls? ( sys-devel/gettext )
- ${GCC_EBUILD_TEST_FLAG}? (
+ test? (
>=dev-util/dejagnu-1.4.4
>=sys-devel/autogen-5.5.4
)"
@@ -1769,11 +1762,9 @@ gcc_do_make() {
#---->> src_test <<----
toolchain_src_test() {
- if use ${GCC_EBUILD_TEST_FLAG} ; then
- cd "${WORKDIR}"/build
- # enable verbose test run and result logging
- emake -k check RUNTESTFLAGS='-a -v'
- fi
+ cd "${WORKDIR}"/build
+ # enable verbose test run and result logging
+ emake -k check
}
#---->> src_install <<----
@@ -1912,13 +1903,6 @@ toolchain_src_install() {
# prune empty dirs left behind
find "${ED}" -depth -type d -delete 2>/dev/null
- # install testsuite results
- if use ${GCC_EBUILD_TEST_FLAG}; then
- docinto testsuite
- find "${WORKDIR}"/build -type f -name "*.sum" -exec dodoc {} +
- find "${WORKDIR}"/build -type f -path "*/testsuite/*.log" -exec dodoc {} +
- fi
-
# Rather install the script, else portage with changing $FILESDIR
# between binary and source package borks things ....
if ! is_crosscompile && [[ ${PN} != "kgcc64" ]] ; then
@@ -2253,11 +2237,6 @@ toolchain_pkg_postinst() {
cp "${ROOT%/}${DATAPATH}"/c{89,99} "${EROOT%/}"/usr/bin/ 2>/dev/null
fi
- if use ${GCC_EBUILD_TEST_FLAG} ; then
- elog "Testsuite results have been installed into /usr/share/doc/${PF}/testsuite"
- echo
- fi
-
if [[ -n ${PRERELEASE}${SNAPSHOT} ]] ; then
einfo "This GCC ebuild is provided for your convenience, and the use"
einfo "of this compiler is not supported by the Gentoo Developers."