From 77398e424e45d9e98c1cef3c43bdadb9d56e81ef Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 10 Nov 2019 13:21:36 +0000 Subject: gentoo resync : 10.11.2019 --- eclass/Manifest.gz | Bin 37628 -> 37611 bytes eclass/autotools.eclass | 5 +--- eclass/ruby-fakegem.eclass | 4 +++ eclass/ruby-ng.eclass | 5 +++- eclass/tests/toolchain-funcs.sh | 24 ++++++++++++++++ eclass/texlive-common.eclass | 4 +-- eclass/texlive-module.eclass | 58 +++++++-------------------------------- eclass/toolchain-binutils.eclass | 3 ++ eclass/toolchain-funcs.eclass | 15 +++++----- eclass/toolchain.eclass | 53 +++++++++++------------------------ 10 files changed, 71 insertions(+), 100 deletions(-) (limited to 'eclass') diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz index 593e355d8ccb..4644cd9185e9 100644 Binary files a/eclass/Manifest.gz and b/eclass/Manifest.gz 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="!=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 -# @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 -# @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." -- cgit v1.2.3