diff options
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/Manifest.gz | bin | 39847 -> 39850 bytes | |||
-rw-r--r-- | eclass/office-ext-r1.eclass | 28 | ||||
-rw-r--r-- | eclass/toolchain-funcs.eclass | 44 | ||||
-rw-r--r-- | eclass/toolchain.eclass | 41 | ||||
-rw-r--r-- | eclass/xorg-3.eclass | 9 |
5 files changed, 86 insertions, 36 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz Binary files differindex 87b8b55f9495..e8223df8633f 100644 --- a/eclass/Manifest.gz +++ b/eclass/Manifest.gz diff --git a/eclass/office-ext-r1.eclass b/eclass/office-ext-r1.eclass index 7e4d894483fe..9ee4561f0c11 100644 --- a/eclass/office-ext-r1.eclass +++ b/eclass/office-ext-r1.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: office-ext-r1.eclass @@ -6,13 +6,13 @@ # The office team <office@gentoo.org> # @AUTHOR: # Tomáš Chvátal <scarabeus@gentoo.org> -# @SUPPORTED_EAPIS: 7 +# @SUPPORTED_EAPIS: 7 8 # @BLURB: Eclass for installing libreoffice extensions # @DESCRIPTION: # Eclass for easing maintenance of libreoffice extensions. case ${EAPI} in - 7) ;; + 7|8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac @@ -70,11 +70,13 @@ fi # @CODE : "${OFFICE_EXTENSIONS_LOCATION:=${DISTDIR}}" -IUSE="" -RDEPEND="" +# Most projects actually do not provide any relevant sourcedir as they are oxt. +S="${WORKDIR}" + +IUSE="$(printf 'office_implementation_%s ' ${OFFICE_IMPLEMENTATIONS[@]})" +REQUIRED_USE="|| ( $(printf 'office_implementation_%s ' ${OFFICE_IMPLEMENTATIONS[@]}) )" for i in ${OFFICE_IMPLEMENTATIONS[@]}; do - IUSE+=" office_implementation_${i}" if [[ ${i} == "libreoffice" ]]; then RDEPEND+=" office_implementation_${i}? ( @@ -86,19 +88,7 @@ for i in ${OFFICE_IMPLEMENTATIONS[@]}; do " fi done - -REQUIRED_USE="|| ( " -for i in ${OFFICE_IMPLEMENTATIONS[@]}; do - REQUIRED_USE+=" office_implementation_${i} " -done -REQUIRED_USE+=" )" - -DEPEND="${RDEPEND} - app-arch/unzip -" - -# Most projects actually do not provide any relevant sourcedir as they are oxt. -S="${WORKDIR}" +BDEPEND="app-arch/unzip" # @FUNCTION: office-ext-r1_src_unpack # @DESCRIPTION: diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index 2911ed66e63c..0abed5b8d75e 100644 --- a/eclass/toolchain-funcs.eclass +++ b/eclass/toolchain-funcs.eclass @@ -647,6 +647,50 @@ _tc-has-openmp() { return ${ret} } +# @FUNCTION: tc-check-min_ver +# @USAGE: <gcc or clang> <minimum version> +# @DESCRIPTION: +# Minimum version of active GCC or Clang to require. +# +# You should test for any necessary minimum version in pkg_pretend in order to +# warn the user of required toolchain changes. You must still check for it at +# build-time, e.g. +# @CODE +# pkg_pretend() { +# [[ ${MERGE_TYPE} != binary ]] && tc-check-min_ver gcc 13.2.0 +# } +# +# pkg_setup() { +# [[ ${MERGE_TYPE} != binary ]] && tc-check-min_ver gcc 13.2.0 +# } +# @CODE +tc-check-min_ver() { + do_check() { + debug-print "Compiler version check for ${1}" + debug-print "Detected: ${2}" + debug-print "Required: ${3}" + if ver_test ${2} -lt ${3}; then + eerror "Your current compiler is too old for this package!" + die "Active compiler is too old for this package (found ${1} ${2})." + fi + } + + case ${1} in + gcc) + tc-is-gcc || return + do_check GCC $(gcc-version) ${2} + ;; + clang) + tc-is-clang || return + do_check Clang $(clang-version) ${2} + ;; + *) + eerror "Unknown first parameter for ${FUNCNAME} - must be gcc or clang" + die "${FUNCNAME}: Parameter ${1} unknown" + ;; + esac +} + # @FUNCTION: tc-check-openmp # @DESCRIPTION: # Test for OpenMP support with the current compiler and error out with diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 8d2c04b6bf25..602f99437145 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -411,16 +411,29 @@ if tc_has_feature valgrind ; then fi if [[ ${PN} != gnat-gpl ]] && tc_has_feature ada ; then - BDEPEND+=" - ada? ( - || ( - sys-devel/gcc:${SLOT}[ada] - <sys-devel/gcc-${SLOT}[ada] - <dev-lang/ada-bootstrap-${SLOT} - dev-lang/gnat-gpl[ada] + if tc_use_major_version_only ; then + BDEPEND+=" + ada? ( + || ( + sys-devel/gcc:${SLOT}[ada] + <sys-devel/gcc-${SLOT}[ada] + <dev-lang/ada-bootstrap-$((${SLOT} + 1)) + dev-lang/gnat-gpl[ada] + ) ) - ) - " + " + else + BDEPEND+=" + ada? ( + || ( + sys-devel/gcc:${SLOT}[ada] + <sys-devel/gcc-${SLOT}[ada] + <dev-lang/ada-bootstrap-${SLOT} + dev-lang/gnat-gpl[ada] + ) + ) + " + fi fi # TODO: Add a pkg_setup & pkg_pretend check for whether the active compiler @@ -970,7 +983,9 @@ toolchain_setup_ada() { # As a penultimate resort, try dev-lang/ada-bootstrap. if ver_test ${ada_bootstrap} -gt ${PV} || [[ -z ${ada_bootstrap} ]] ; then ebegin "Testing fallback dev-lang/ada-bootstrap for Ada" - if has_version -b "<dev-lang/ada-bootstrap-${SLOT}" ; then + # XXX: This can be cleaned up like BDEPEND for tc_use_major_version_only + # once we only support such versions. + if has_version -b "=dev-lang/ada-bootstrap-${SLOT}*" || has_version -b "<dev-lang/ada-bootstrap-${SLOT}" ; then # Workaround the old scheme if has_version -b "=dev-lang/ada-bootstrap-0_p2021*" ; then ada_bootstrap=10 @@ -2790,8 +2805,10 @@ gcc_movelibs() { mv "${ED}"/usr/nvptx-none/lib/mgomp/mptx-3.1/*.{a,spec} "${ED}"/usr/lib/gcc/${CHOST}/${GCCMAJOR}/accel/nvptx-none/mgomp/mptx-3.1/ mv "${ED}"/usr/lib/gcc/nvptx-none/${GCCMAJOR}/*.{a,spec} "${ED}"/usr/lib/gcc/${CHOST}/${GCCMAJOR}/accel/nvptx-none/ || die mv "${ED}"/usr/lib/gcc/nvptx-none/${GCCMAJOR}/mgomp/*.{a,spec} "${ED}"/usr/lib/gcc/${CHOST}/${GCCMAJOR}/accel/nvptx-none/mgomp/ || die - mv "${ED}"/usr/lib/gcc/nvptx-none/${GCCMAJOR}/mptx-3.1/*.{a,spec} "${ED}"/usr/lib/gcc/${CHOST}/${GCCMAJOR}/accel/nvptx-none/mptx-3.1/ || die - mv "${ED}"/usr/lib/gcc/nvptx-none/${GCCMAJOR}/mgomp/mptx-3.1/*.{a,spec} "${ED}"/usr/lib/gcc/${CHOST}/${GCCMAJOR}/accel/nvptx-none/mgomp/mptx-3.1/ || die + # Nonfatal because the multilib variants change: see r15-5975-g86b3a7532d56f7 and r15-6029-gd4e1f7cfdb8375 + # TODO: Should we enable all of them unconditionally? Expose it somehow (USE_EXPAND?)? + mv "${ED}"/usr/lib/gcc/nvptx-none/${GCCMAJOR}/mptx-3.1/*.{a,spec} "${ED}"/usr/lib/gcc/${CHOST}/${GCCMAJOR}/accel/nvptx-none/mptx-3.1/ + mv "${ED}"/usr/lib/gcc/nvptx-none/${GCCMAJOR}/mgomp/mptx-3.1/*.{a,spec} "${ED}"/usr/lib/gcc/${CHOST}/${GCCMAJOR}/accel/nvptx-none/mgomp/mptx-3.1/ fi # We remove directories separately to avoid this case: diff --git a/eclass/xorg-3.eclass b/eclass/xorg-3.eclass index ee4038533bfd..2ca5959dd1e7 100644 --- a/eclass/xorg-3.eclass +++ b/eclass/xorg-3.eclass @@ -8,7 +8,7 @@ # Author: Tomáš Chvátal <scarabeus@gentoo.org> # Author: Donnie Berkholz <dberkholz@gentoo.org> # Author: Matt Turner <mattst88@gentoo.org> -# @SUPPORTED_EAPIS: 7 8 +# @SUPPORTED_EAPIS: 8 # @PROVIDES: multilib-minimal # @BLURB: Reduces code duplication in the modularized X11 ebuilds. # @DESCRIPTION: @@ -23,7 +23,7 @@ # everything else should be automatic. case ${EAPI} in - 7|8) ;; + 8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac @@ -111,9 +111,8 @@ HOMEPAGE="https://www.x.org/wiki/ https://gitlab.freedesktop.org/xorg/${XORG_MOD # @ECLASS_VARIABLE: XORG_TARBALL_SUFFIX # @PRE_INHERIT # @DESCRIPTION: -# Most X11 projects provide tarballs as tar.bz2 or tar.xz. This eclass defaults -# to bz2. -: "${XORG_TARBALL_SUFFIX:="bz2"}" +# Most X11 projects provide tarballs as tar.xz. This eclass defaults to xz. +: "${XORG_TARBALL_SUFFIX:="xz"}" if [[ ${PV} == *9999* ]]; then : "${EGIT_REPO_URI:="https://gitlab.freedesktop.org/xorg/${XORG_MODULE}${XORG_PACKAGE_NAME}.git"}" |