diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-02-10 15:40:27 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-02-10 15:40:27 +0000 |
commit | 6bc2e4d7c5906e46a8f275a876ead6ec41aca5bb (patch) | |
tree | cee0a97398040001220ece3cd48c3d568bcddb4a /eclass | |
parent | 1db00cc6e94b90c08090bb5b8c406622946c4ae5 (diff) |
gentoo resync : 10.02.2019
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/Manifest.gz | bin | 37442 -> 37442 bytes | |||
-rw-r--r-- | eclass/golang-base.eclass | 14 | ||||
-rw-r--r-- | eclass/golang-build.eclass | 4 | ||||
-rw-r--r-- | eclass/golang-vcs-snapshot.eclass | 4 | ||||
-rw-r--r-- | eclass/golang-vcs.eclass | 4 | ||||
-rw-r--r-- | eclass/java-vm-2.eclass | 2 | ||||
-rw-r--r-- | eclass/kde5-functions.eclass | 19 | ||||
-rw-r--r-- | eclass/kde5.eclass | 159 | ||||
-rw-r--r-- | eclass/meson.eclass | 29 | ||||
-rw-r--r-- | eclass/opam.eclass | 18 | ||||
-rw-r--r-- | eclass/qt5-build.eclass | 13 | ||||
-rw-r--r-- | eclass/tmpfiles.eclass | 4 | ||||
-rw-r--r-- | eclass/toolchain-glibc.eclass | 2 | ||||
-rw-r--r-- | eclass/toolchain.eclass | 47 |
14 files changed, 227 insertions, 92 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz Binary files differindex 76f9b322f4c9..c9bc53f1bba4 100644 --- a/eclass/Manifest.gz +++ b/eclass/Manifest.gz diff --git a/eclass/golang-base.eclass b/eclass/golang-base.eclass index c8308d286658..cd36a269bf1a 100644 --- a/eclass/golang-base.eclass +++ b/eclass/golang-base.eclass @@ -4,7 +4,7 @@ # @ECLASS: golang-base.eclass # @MAINTAINER: # William Hubbs <williamh@gentoo.org> -# @SUPPORTED_EAPIS: 5 6 +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: Eclass that provides base functions for Go packages. # @DESCRIPTION: # This eclass provides base functions for software written in the Go @@ -12,7 +12,7 @@ # dev-lang/go. case "${EAPI:-0}" in - 5|6) + 5|6|7) ;; *) die "${ECLASS}: Unsupported eapi (EAPI=${EAPI})" @@ -23,12 +23,18 @@ if [[ -z ${_GOLANG_BASE} ]]; then _GOLANG_BASE=1 -DEPEND=">=dev-lang/go-1.9" +GO_DEPEND=">=dev-lang/go-1.10" +if [[ ${EAPI:-0} == [56] ]]; then + DEPEND="${GO_DEPEND}" +else + BDEPEND="${GO_DEPEND}" +fi # Do not complain about CFLAGS etc since go projects do not use them. QA_FLAGS_IGNORED='.*' -STRIP_MASK="*.a" +# Upstream does not support stripping go packages +RESTRICT="strip" # @ECLASS-VARIABLE: EGO_PN # @REQUIRED diff --git a/eclass/golang-build.eclass b/eclass/golang-build.eclass index bb662ad45baf..c76a1865a48f 100644 --- a/eclass/golang-build.eclass +++ b/eclass/golang-build.eclass @@ -4,7 +4,7 @@ # @ECLASS: golang-build.eclass # @MAINTAINER: # William Hubbs <williamh@gentoo.org> -# @SUPPORTED_EAPIS: 5 6 +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: Eclass for compiling go packages. # @DESCRIPTION: # This eclass provides default src_compile, src_test and src_install @@ -13,7 +13,7 @@ inherit golang-base case "${EAPI:-0}" in - 5|6) + 5|6|7) ;; *) die "${ECLASS}: Unsupported eapi (EAPI=${EAPI})" diff --git a/eclass/golang-vcs-snapshot.eclass b/eclass/golang-vcs-snapshot.eclass index 975b23df45f4..3a35d7e1aa58 100644 --- a/eclass/golang-vcs-snapshot.eclass +++ b/eclass/golang-vcs-snapshot.eclass @@ -4,7 +4,7 @@ # @ECLASS: golang-vcs-snapshot.eclass # @MAINTAINER: # William Hubbs <williamh@gentoo.org> -# @SUPPORTED_EAPIS: 5 6 +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: support eclass for unpacking VCS snapshot tarballs for # software written in the Go programming language # @DESCRIPTION: @@ -46,7 +46,7 @@ inherit golang-base case ${EAPI:-0} in - 5|6) ;; + 5|6|7) ;; *) die "${ECLASS} API in EAPI ${EAPI} not yet established." esac diff --git a/eclass/golang-vcs.eclass b/eclass/golang-vcs.eclass index 09f80b15d675..561d1a0c4da1 100644 --- a/eclass/golang-vcs.eclass +++ b/eclass/golang-vcs.eclass @@ -4,7 +4,7 @@ # @ECLASS: golang-vcs.eclass # @MAINTAINER: # William Hubbs <williamh@gentoo.org> -# @SUPPORTED_EAPIS: 5 6 +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: Eclass for fetching and unpacking go repositories. # @DESCRIPTION: # This eclass is written to ease the maintenance of live ebuilds @@ -13,7 +13,7 @@ inherit eutils golang-base case "${EAPI:-0}" in - 5|6) + 5|6|7) ;; *) die "${ECLASS}: Unsupported eapi (EAPI=${EAPI})" diff --git a/eclass/java-vm-2.eclass b/eclass/java-vm-2.eclass index 2ce5bce0e71b..d71b7285996d 100644 --- a/eclass/java-vm-2.eclass +++ b/eclass/java-vm-2.eclass @@ -123,7 +123,7 @@ get_system_arch() { case $(get_abi_CHOST ${abi}) in mips*l*) echo mipsel ;; mips*) echo mips ;; - ppc64le*) echo ppc64le ;; + powerpc64le*) echo ppc64le ;; *) case ${abi} in *_fbsd) get_system_arch ${abi%_fbsd} ;; diff --git a/eclass/kde5-functions.eclass b/eclass/kde5-functions.eclass index 28446ed82f19..71686d1a0331 100644 --- a/eclass/kde5-functions.eclass +++ b/eclass/kde5-functions.eclass @@ -36,15 +36,18 @@ export KDE_BUILD_TYPE case ${CATEGORY} in kde-frameworks) [[ ${KDE_BUILD_TYPE} = live ]] && : ${FRAMEWORKS_MINIMAL:=9999} - [[ ${PV} = 5.52.0* ]] && : ${QT_MINIMAL:=5.9.4} ;; kde-plasma) + [[ ${PV} = 5.14.5 ]] && : ${FRAMEWORKS_MINIMAL:=5.52.0} if [[ ${KDE_BUILD_TYPE} = live && ${PV} != 5.??.49* ]]; then : ${FRAMEWORKS_MINIMAL:=9999} fi ;; kde-apps) - [[ ${PV} = 18.08.3* ]] && : ${QT_MINIMAL:=5.9.4} + if [[ ${PV} = 18.08.3* ]]; then + : ${QT_MINIMAL:=5.9.4} + : ${FRAMEWORKS_MINIMAL:=5.52.0} + fi ;; esac @@ -56,7 +59,7 @@ esac # @ECLASS-VARIABLE: FRAMEWORKS_MINIMAL # @DESCRIPTION: # Minimum version of Frameworks to require. This affects add_frameworks_dep. -: ${FRAMEWORKS_MINIMAL:=5.52.0} +: ${FRAMEWORKS_MINIMAL:=5.54.0} # @ECLASS-VARIABLE: PLASMA_MINIMAL # @DESCRIPTION: @@ -138,7 +141,7 @@ _add_category_dep() { if [[ -n ${slot} ]] ; then slot=":${slot}" - elif [[ ${SLOT%\/*} = 4 || ${SLOT%\/*} = 5 ]] && ! has kde5-meta-pkg ${INHERITED} ; then + elif [[ ${SLOT%\/*} = 5 ]] ; then slot=":${SLOT%\/*}" fi @@ -264,10 +267,10 @@ add_qt_dep() { local slot=${4} if [[ -z ${version} ]]; then - if [[ ${1} = qtwebkit && $(ver_cut 2 ${QT_MINIMAL}) -ge 9 ]]; then - version=5.9.1 # no more upstream release, need bug #624404 - else - version=${QT_MINIMAL} + version=${QT_MINIMAL} + if [[ ${1} = qtwebkit ]]; then + version=5.9.1 + [[ ${EAPI} != 6 ]] && die "${FUNCNAME} is disallowed for 'qtwebkit' in EAPI 7 and later" fi fi if [[ -z ${slot} ]]; then diff --git a/eclass/kde5.eclass b/eclass/kde5.eclass index daf869fe8b9a..82655acabcc0 100644 --- a/eclass/kde5.eclass +++ b/eclass/kde5.eclass @@ -31,10 +31,11 @@ _KDE5_ECLASS=1 # for tests you should proceed with setting VIRTUALX_REQUIRED=test. : ${VIRTUALX_REQUIRED:=manual} -inherit cmake-utils flag-o-matic gnome2-utils kde5-functions virtualx xdg +inherit cmake-utils flag-o-matic kde5-functions virtualx case ${EAPI} in - 6) inherit eapi7-ver eutils ;; + 6) inherit eapi7-ver eutils gnome2-utils xdg ;; + 7) inherit xdg-utils ;; esac if [[ ${KDE_BUILD_TYPE} = live ]]; then @@ -197,7 +198,7 @@ esac case ${KDE_AUTODEPS} in false) ;; *) - DEPEND+=" $(add_frameworks_dep extra-cmake-modules)" + BDEPEND+=" $(add_frameworks_dep extra-cmake-modules)" RDEPEND+=" >=kde-frameworks/kf-env-4" COMMONDEPEND+=" $(add_qt_dep qtcore)" @@ -224,7 +225,7 @@ case ${KDE_DESIGNERPLUGIN} in false) ;; *) IUSE+=" designer" - DEPEND+=" designer? ( $(add_frameworks_dep kdesignerplugin) )" + BDEPEND+=" designer? ( $(add_frameworks_dep kdesignerplugin) )" esac case ${KDE_EXAMPLES} in @@ -238,7 +239,7 @@ case ${KDE_HANDBOOK} in false) ;; *) IUSE+=" +handbook" - DEPEND+=" handbook? ( $(add_frameworks_dep kdoctools) )" + BDEPEND+=" handbook? ( $(add_frameworks_dep kdoctools) )" ;; esac @@ -247,7 +248,7 @@ case ${KDE_QTHELP} in *) IUSE+=" doc" COMMONDEPEND+=" doc? ( $(add_qt_dep qt-docs) )" - DEPEND+=" doc? ( + BDEPEND+=" doc? ( $(add_qt_dep qthelp) >=app-doc/doxygen-1.8.13-r1 )" @@ -270,6 +271,10 @@ case ${KDE_SELINUX_MODULE} in ;; esac +case ${EAPI} in + 6) DEPEND+=" ${BDEPEND}" ;; +esac + DEPEND+=" ${COMMONDEPEND} dev-util/desktop-file-utils" RDEPEND+=" ${COMMONDEPEND}" unset COMMONDEPEND @@ -632,6 +637,8 @@ kde5_src_configure() { # install mkspecs in the same directory as qt stuff -DKDE_INSTALL_USE_QT_SYS_PATHS=ON ) + # move handbook outside of doc dir for at least two QA warnings, bug 667138 + [[ ${EAPI} != 6 ]] && cmakeargs+=( -DKDE_INSTALL_DOCBUNDLEDIR="${EPREFIX}/usr/share/help" ) fi # allow the ebuild to override what we set here @@ -700,10 +707,127 @@ kde5_src_install() { docompress -x /usr/share/doc/qt-${pv} fi - # We don't want /usr/share/doc/HTML to be compressed, - # because then khelpcenter can't find the docs - if [[ -d ${ED%/}/usr/share/doc/HTML ]]; then - docompress -x /usr/share/doc/HTML + if [[ ${EAPI} = 6 ]]; then + # We don't want /usr/share/doc/HTML to be compressed, + # because then khelpcenter can't find the docs + #todo: clean up trailing slash check when EAPI <7 is removed + if [[ -d ${ED%/}/usr/share/doc/HTML ]]; then + docompress -x /usr/share/doc/HTML + fi + fi +} + +# @FUNCTION: _xdg_icon_cache_update +# @DESCRIPTION: Forked from future xdg-utils.eclass. REMOVEME! +# Updates Gtk+ icon cache files under /usr/share/icons. +# This function should be called from pkg_postinst and pkg_postrm. +_xdg_icon_cache_update() { + if [[ ${EBUILD_PHASE} != post* ]] ; then + die "xdg_icon_cache_update must be used in pkg_post* phases." + fi + + if ! type gtk-update-icon-cache &>/dev/null; then + debug-print "gtk-update-icon-cache is not found" + return + fi + + ebegin "Updating icons cache" + local retval=0 + local fails=( ) + for dir in "${EROOT%/}"/usr/share/icons/* + do + if [[ -f "${dir}/index.theme" ]] ; then + local rv=0 + gtk-update-icon-cache -qf "${dir}" + rv=$? + if [[ ! $rv -eq 0 ]] ; then + debug-print "Updating cache failed on ${dir}" + # Add to the list of failures + fails+=( "${dir}" ) + retval=2 + fi + elif [[ $(ls "${dir}") = "icon-theme.cache" ]]; then + # Clear stale cache files after theme uninstallation + rm "${dir}/icon-theme.cache" + fi + if [[ -z $(ls "${dir}") ]]; then + # Clear empty theme directories after theme uninstallation + rmdir "${dir}" + fi + done + eend ${retval} + for f in "${fails[@]}" ; do + eerror "Failed to update cache with icon $f" + done +} + +# @FUNCTION: _xdg_pkg_preinst +# @DESCRIPTION: Forked from future xdg.eclass. REMOVEME! +# Finds .desktop, icon and mime info files for later handling in pkg_postinst. +# Locations are stored in XDG_ECLASS_DESKTOPFILES, XDG_ECLASS_ICONFILES +# and XDG_ECLASS_MIMEINFOFILES respectively. +_xdg_pkg_preinst() { + local f + + XDG_ECLASS_DESKTOPFILES=() + while IFS= read -r -d '' f; do + XDG_ECLASS_DESKTOPFILES+=( ${f} ) + done < <(cd "${ED}" && find 'usr/share/applications' -type f -print0 2>/dev/null) + + XDG_ECLASS_ICONFILES=() + while IFS= read -r -d '' f; do + XDG_ECLASS_ICONFILES+=( ${f} ) + done < <(cd "${ED}" && find 'usr/share/icons' -type f -print0 2>/dev/null) + + XDG_ECLASS_MIMEINFOFILES=() + while IFS= read -r -d '' f; do + XDG_ECLASS_MIMEINFOFILES+=( ${f} ) + done < <(cd "${ED}" && find 'usr/share/mime' -type f -print0 2>/dev/null) +} + +# @FUNCTION: _xdg_pkg_postinst +# @DESCRIPTION: Forked from future xdg.eclass. REMOVEME! +# Handle desktop, icon and mime info database updates. +_xdg_pkg_postinst() { + if [[ ${#XDG_ECLASS_DESKTOPFILES[@]} -gt 0 ]]; then + xdg_desktop_database_update + else + debug-print "No .desktop files to add to database" + fi + + if [[ ${#XDG_ECLASS_ICONFILES[@]} -gt 0 ]]; then + _xdg_icon_cache_update + else + debug-print "No icon files to add to cache" + fi + + if [[ ${#XDG_ECLASS_MIMEINFOFILES[@]} -gt 0 ]]; then + xdg_mimeinfo_database_update + else + debug-print "No mime info files to add to database" + fi +} + +# @FUNCTION: _xdg_pkg_postrm +# @DESCRIPTION: Forked from future xdg.eclass. REMOVEME! +# Handle desktop, icon and mime info database updates. +_xdg_pkg_postrm() { + if [[ ${#XDG_ECLASS_DESKTOPFILES[@]} -gt 0 ]]; then + xdg_desktop_database_update + else + debug-print "No .desktop files to add to database" + fi + + if [[ ${#XDG_ECLASS_ICONFILES[@]} -gt 0 ]]; then + _xdg_icon_cache_update + else + debug-print "No icon files to add to cache" + fi + + if [[ ${#XDG_ECLASS_MIMEINFOFILES[@]} -gt 0 ]]; then + xdg_mimeinfo_database_update + else + debug-print "No mime info files to add to database" fi } @@ -713,8 +837,9 @@ kde5_src_install() { kde5_pkg_preinst() { debug-print-function ${FUNCNAME} "$@" - gnome2_icon_savelist - xdg_pkg_preinst + [[ ${EAPI} == 6 ]] && gnome2_icon_savelist + [[ ${EAPI} == 6 ]] && xdg_pkg_preinst + [[ ${EAPI} == 7 ]] && _xdg_pkg_preinst } # @FUNCTION: kde5_pkg_postinst @@ -723,10 +848,11 @@ kde5_pkg_preinst() { kde5_pkg_postinst() { debug-print-function ${FUNCNAME} "$@" - if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then + if [[ ${EAPI} == 6 && -n ${GNOME2_ECLASS_ICONS} ]]; then gnome2_icon_cache_update fi - xdg_pkg_postinst + [[ ${EAPI} == 6 ]] && xdg_pkg_postinst + [[ ${EAPI} == 7 ]] && _xdg_pkg_postinst if [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]]; then if [[ ${KDE_BUILD_TYPE} = live ]]; then @@ -744,10 +870,11 @@ kde5_pkg_postinst() { kde5_pkg_postrm() { debug-print-function ${FUNCNAME} "$@" - if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then + if [[ ${EAPI} == 6 && -n ${GNOME2_ECLASS_ICONS} ]]; then gnome2_icon_cache_update fi - xdg_pkg_postrm + [[ ${EAPI} == 6 ]] && xdg_pkg_postrm + [[ ${EAPI} == 7 ]] && _xdg_pkg_postrm } fi diff --git a/eclass/meson.eclass b/eclass/meson.eclass index 0a80c6b698b9..75291d7bdd1b 100644 --- a/eclass/meson.eclass +++ b/eclass/meson.eclass @@ -39,16 +39,6 @@ case ${EAPI:-0} in *) die "EAPI=${EAPI} is not supported" ;; esac -if [[ ${__MESON_AUTO_DEPEND+set} == "set" ]] ; then - # See if we were included already, but someone changed the value - # of MESON_AUTO_DEPEND on us. We could reload the entire - # eclass at that point, but that adds overhead, and it's trivial - # to re-order inherit in eclasses/ebuilds instead. #409611 - if [[ ${__MESON_AUTO_DEPEND} != ${MESON_AUTO_DEPEND} ]] ; then - die "MESON_AUTO_DEPEND changed value between inherits; please inherit meson.eclass first! ${__MESON_AUTO_DEPEND} -> ${MESON_AUTO_DEPEND}" - fi -fi - if [[ -z ${_MESON_ECLASS} ]]; then inherit ninja-utils python-utils-r1 toolchain-funcs @@ -60,23 +50,14 @@ EXPORT_FUNCTIONS src_configure src_compile src_test src_install if [[ -z ${_MESON_ECLASS} ]]; then _MESON_ECLASS=1 -MESON_DEPEND=">=dev-util/meson-0.45.1 +MESON_DEPEND=">=dev-util/meson-0.48.2 >=dev-util/ninja-1.7.2" -# @ECLASS-VARIABLE: MESON_AUTO_DEPEND -# @DESCRIPTION: -# Set to 'no' to disable automatically adding to DEPEND. This lets -# ebuilds form conditional depends by using ${MESON_DEPEND} in -# their own DEPEND string. -: ${MESON_AUTO_DEPEND:=yes} -if [[ ${MESON_AUTO_DEPEND} != "no" ]] ; then - if [[ ${EAPI:-0} == [0123456] ]]; then - DEPEND=${MESON_DEPEND} - else - BDEPEND=${MESON_DEPEND} - fi +if [[ ${EAPI:-0} == [6] ]]; then + DEPEND=${MESON_DEPEND} +else + BDEPEND=${MESON_DEPEND} fi -__MESON_AUTO_DEPEND=${MESON_AUTO_DEPEND} # See top of eclass # @ECLASS-VARIABLE: BUILD_DIR # @DEFAULT_UNSET diff --git a/eclass/opam.eclass b/eclass/opam.eclass index 5c9c4950dd26..5cd6748929cf 100644 --- a/eclass/opam.eclass +++ b/eclass/opam.eclass @@ -13,8 +13,8 @@ # src_install for opam-based packages. case ${EAPI:-0} in - 0|1|2|3|4) die "You need at least EAPI-5 to use opam.eclass";; - *) ;; + 5|6|7) ;; + *) die "${ECLASS}: EAPI ${EAPI} not supported" ;; esac RDEPEND=">=dev-lang/ocaml-4:=" @@ -30,10 +30,10 @@ opam-install() { local pkg for pkg ; do opam-installer -i \ - --prefix="${ED}usr" \ - --libdir="${D}$(ocamlc -where)" \ - --docdir="${ED}usr/share/doc/${PF}" \ - --mandir="${ED}usr/share/man" \ + --prefix="${ED%/}/usr" \ + --libdir="${D%/}/$(ocamlc -where)" \ + --docdir="${ED%/}/usr/share/doc/${PF}" \ + --mandir="${ED%/}/usr/share/man" \ "${pkg}.install" || die done } @@ -42,9 +42,9 @@ opam_src_install() { local pkg="${1:-${PN}}" opam-install "${pkg}" # Handle opam putting doc in a subdir - if [ -d "${ED}usr/share/doc/${PF}/${pkg}" ] ; then - mv "${ED}usr/share/doc/${PF}/${pkg}/"* "${ED}usr/share/doc/${PF}/" || die - rmdir "${ED}usr/share/doc/${PF}/${pkg}" || die + if [ -d "${ED%/}/usr/share/doc/${PF}/${pkg}" ] ; then + mv "${ED%/}/usr/share/doc/${PF}/${pkg}/"* "${ED%/}/usr/share/doc/${PF}/" || die + rmdir "${ED%/}/usr/share/doc/${PF}/${pkg}" || die fi } diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass index 83f66220c735..d0a73287222e 100644 --- a/eclass/qt5-build.eclass +++ b/eclass/qt5-build.eclass @@ -178,14 +178,11 @@ qt5-build_src_prepare() { sed -i -e "/^QMAKE_CONF_COMPILER=/ s:=.*:=\"$(tc-getCXX)\":" \ configure || die "sed failed (QMAKE_CONF_COMPILER)" - # Don't inject -msse/-mavx/... into CXXFLAGS when detecting - # compiler support for extended instruction sets (bug 552942) - find config.tests/common -name '*.pro' -type f -execdir \ - sed -i -e '/QMAKE_CXXFLAGS\s*+=/ d' '{}' + || die - - # Don't add -O3 to CXXFLAGS (bug 549140) - sed -i -e '/CONFIG\s*+=/ s/optimize_full//' \ - src/{corelib/corelib,gui/gui}.pro || die "sed failed (optimize_full)" + if [[ ${QT5_MINOR_VERSION} -lt 12 ]]; then + # Don't add -O3 to CXXFLAGS (bug 549140) + sed -i -e '/CONFIG\s*+=/ s/optimize_full//' \ + src/{corelib/corelib,gui/gui}.pro || die "sed failed (optimize_full)" + fi # Respect build variables in configure tests (bug #639494) sed -i -e "s|\"\$outpath/bin/qmake\" \"\$relpathMangled\" -- \"\$@\"|& $(qt5_qmake_args) |" configure || die diff --git a/eclass/tmpfiles.eclass b/eclass/tmpfiles.eclass index a1f155e63a4d..a8bb9061ec8c 100644 --- a/eclass/tmpfiles.eclass +++ b/eclass/tmpfiles.eclass @@ -8,7 +8,7 @@ # @AUTHOR: # Mike Gilbert <floppym@gentoo.org> # William Hubbs <williamh@gentoo.org> -# @SUPPORTED_EAPIS: 5 6 +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: Functions related to tmpfiles.d files # @DESCRIPTION: # This eclass provides functionality related to installing and @@ -56,7 +56,7 @@ if [[ -z ${TMPFILES_ECLASS} ]]; then TMPFILES_ECLASS=1 case "${EAPI}" in -5|6) ;; +5|6|7) ;; *) die "API is undefined for EAPI ${EAPI}" ;; esac diff --git a/eclass/toolchain-glibc.eclass b/eclass/toolchain-glibc.eclass index 7c134682db5f..6698f2045e22 100644 --- a/eclass/toolchain-glibc.eclass +++ b/eclass/toolchain-glibc.eclass @@ -371,7 +371,7 @@ setup_env() { export ABI=${ABI:-${DEFAULT_ABI:-default}} - if use headers-only ; then + if just_headers ; then # Avoid mixing host's CC and target's CFLAGS_${ABI}: # At this bootstrap stage we have only binutils for # target but not compiler yet. diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 018079ba9378..56921228daa9 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -128,12 +128,18 @@ else LICENSE="GPL-2+ LGPL-2.1+ FDL-1.1+" fi -IUSE="regression-test vanilla" -IUSE_DEF=( nls nptl ) +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 +nptl" if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then - IUSE+=" altivec debug" - IUSE_DEF+=( cxx fortran ) + IUSE+=" altivec debug +cxx +fortran" [[ -n ${PIE_VER} ]] && IUSE+=" nopie" [[ -n ${HTB_VER} ]] && IUSE+=" boundschecking" [[ -n ${D_VER} ]] && IUSE+=" d" @@ -144,13 +150,13 @@ if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then tc_version_is_at_least 4.0 && IUSE+=" objc-gc" tc_version_is_between 4.0 4.9 && IUSE+=" mudflap" tc_version_is_at_least 4.1 && IUSE+=" libssp objc++" - tc_version_is_at_least 4.2 && IUSE_DEF+=( openmp ) + tc_version_is_at_least 4.2 && IUSE+=" +openmp" tc_version_is_at_least 4.3 && IUSE+=" fixed-point" tc_version_is_at_least 4.7 && IUSE+=" go" # Note: while <=gcc-4.7 also supported graphite, it required forked ppl # versions which we dropped. Since graphite was also experimental in # the older versions, we don't want to bother supporting it. #448024 - tc_version_is_at_least 4.8 && IUSE+=" graphite" IUSE_DEF+=( sanitize ) + tc_version_is_at_least 4.8 && IUSE+=" graphite +sanitize" tc_version_is_between 4.9 8 && IUSE+=" cilk" tc_version_is_at_least 4.9 && IUSE+=" +vtv" tc_version_is_at_least 5.0 && IUSE+=" jit mpx" @@ -159,8 +165,6 @@ if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then tc_version_is_at_least 8.0 && IUSE+=" systemtap" fi -IUSE+=" ${IUSE_DEF[*]/#/+}" - SLOT="${GCC_CONFIG_VER}" #---->> DEPEND <<---- @@ -203,7 +207,7 @@ DEPEND="${RDEPEND} >=sys-devel/bison-1.875 >=sys-devel/flex-2.5.4 nls? ( sys-devel/gettext ) - regression-test? ( + ${GCC_EBUILD_TEST_FLAG}? ( >=dev-util/dejagnu-1.4.4 >=sys-devel/autogen-5.5.4 )" @@ -1303,7 +1307,8 @@ toolchain_src_configure() { fi if tc_version_is_at_least 4.8 && in_iuse sanitize ; then - confgcc+=( $(use_enable sanitize libsanitizer) ) + # See Note [implicitly enabled flags] + confgcc+=( $(usex sanitize '' --disable-libsanitizer) ) fi if tc_version_is_at_least 6.0 && in_iuse pie ; then @@ -1723,7 +1728,7 @@ gcc_do_make() { #---->> src_test <<---- toolchain_src_test() { - if use regression-test ; then + if use ${GCC_EBUILD_TEST_FLAG} ; then cd "${WORKDIR}"/build emake -k check fi @@ -1863,7 +1868,7 @@ toolchain_src_install() { find "${ED}" -depth -type d -delete 2>/dev/null # install testsuite results - if use regression-test; then + 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 {} + @@ -2191,7 +2196,7 @@ toolchain_pkg_postinst() { cp "${ROOT%/}${DATAPATH}"/c{89,99} "${EROOT%/}"/usr/bin/ 2>/dev/null fi - if use regression-test ; then + if use ${GCC_EBUILD_TEST_FLAG} ; then elog "Testsuite results have been installed into /usr/share/doc/${PF}/testsuite" echo fi @@ -2498,3 +2503,19 @@ toolchain_death_notice() { popd >/dev/null fi } + +# Note [implicitly enabled flags] +# ------------------------------- +# Usually configure-based packages handle explicit feature requests +# like +# ./configure --enable-foo +# as explicit request to check for support of 'foo' and bail out at +# configure time. +# +# GCC does not follow this pattern and instead overrides autodetection +# of the feature and enables it unconditionally. +# See https://gcc.gnu.org/PR85663 +# +# Thus safer way to enable/disable the feature is to rely on implicit +# enabled-by-default state: +# econf $(usex foo '' --disable-foo) |