diff options
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/Manifest.gz | bin | 39215 -> 39556 bytes | |||
-rw-r--r-- | eclass/autotools.eclass | 2 | ||||
-rw-r--r-- | eclass/bzr.eclass | 1 | ||||
-rw-r--r-- | eclass/flag-o-matic.eclass | 4 | ||||
-rw-r--r-- | eclass/git-r3.eclass | 13 | ||||
-rw-r--r-- | eclass/gnome.org.eclass | 19 | ||||
-rw-r--r-- | eclass/gnome2-utils.eclass | 97 | ||||
-rw-r--r-- | eclass/gnome2.eclass | 38 | ||||
-rw-r--r-- | eclass/go-env.eclass | 65 | ||||
-rw-r--r-- | eclass/golang-base.eclass | 13 | ||||
-rw-r--r-- | eclass/golang-build.eclass | 6 | ||||
-rw-r--r-- | eclass/golang-vcs-snapshot.eclass | 6 | ||||
-rw-r--r-- | eclass/golang-vcs.eclass | 6 | ||||
-rw-r--r-- | eclass/kernel-2.eclass | 2 | ||||
-rw-r--r-- | eclass/kernel-build.eclass | 69 | ||||
-rw-r--r-- | eclass/kernel-install.eclass | 100 | ||||
-rw-r--r-- | eclass/linux-info.eclass | 29 | ||||
-rw-r--r-- | eclass/llvm.org.eclass | 8 | ||||
-rw-r--r-- | eclass/mount-boot-utils.eclass | 2 | ||||
-rw-r--r-- | eclass/mount-boot.eclass | 2 | ||||
-rw-r--r-- | eclass/rebar-utils.eclass | 160 | ||||
-rw-r--r-- | eclass/rebar.eclass | 112 | ||||
-rw-r--r-- | eclass/rebar3.eclass | 194 | ||||
-rw-r--r-- | eclass/tree-sitter-grammar.eclass | 4 | ||||
-rw-r--r-- | eclass/vcs-snapshot.eclass | 16 |
25 files changed, 607 insertions, 361 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz Binary files differindex 641abbe27db0..0229cf10b1b1 100644 --- a/eclass/Manifest.gz +++ b/eclass/Manifest.gz diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass index a456e9b9f589..3c9e89bda90e 100644 --- a/eclass/autotools.eclass +++ b/eclass/autotools.eclass @@ -94,7 +94,7 @@ _LATEST_AUTOCONF=( 2.72-r1:2.72 2.71-r6:2.71 ) # Do NOT change this variable in your ebuilds! # If you want to force a newer minor version, you can specify the correct # WANT value by using a colon: <PV>:<WANT_AUTOMAKE> -_LATEST_AUTOMAKE=( 1.16.5:1.16 ) +_LATEST_AUTOMAKE=( 1.17-r1:1.17 1.16.5:1.16 ) _automake_atom="dev-build/automake" _autoconf_atom="dev-build/autoconf" diff --git a/eclass/bzr.eclass b/eclass/bzr.eclass index d522326773e1..b442381dc668 100644 --- a/eclass/bzr.eclass +++ b/eclass/bzr.eclass @@ -1,6 +1,7 @@ # Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# @DEAD # @ECLASS: bzr.eclass # @MAINTAINER: # Ulrich Müller <ulm@gentoo.org> diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass index ecac452aa0ef..c6b1ad80e12e 100644 --- a/eclass/flag-o-matic.eclass +++ b/eclass/flag-o-matic.eclass @@ -129,6 +129,10 @@ _setup-allowed-flags() { # needed for arm64 (and in particular SCS) -ffixed-x18 + # needed for riscv (to prevent unaligned vector access) + # See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115789 + -mstrict-align -mvector-strict-align + # gcc 4.5 -mno-fma4 -mno-movbe -mno-xop -mno-lwp # gcc 4.6 diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass index 565f6ada8382..35ad6afe8e88 100644 --- a/eclass/git-r3.eclass +++ b/eclass/git-r3.eclass @@ -4,7 +4,7 @@ # @ECLASS: git-r3.eclass # @MAINTAINER: # Michał Górny <mgorny@gentoo.org> -# @SUPPORTED_EAPIS: 6 7 8 +# @SUPPORTED_EAPIS: 7 8 # @BLURB: Eclass for fetching and unpacking git repositories. # @DESCRIPTION: # Third generation eclass for easing maintenance of live ebuilds using @@ -26,7 +26,7 @@ # If non-empty, then the repo likely needs EGIT_LFS to clone properly. case ${EAPI} in - 6|7|8) ;; + 7|8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac @@ -35,13 +35,8 @@ _GIT_R3_ECLASS=1 PROPERTIES+=" live" -if [[ ${EAPI} != 6 ]]; then - BDEPEND=">=dev-vcs/git-1.8.2.1[curl]" - [[ ${EGIT_LFS} ]] && BDEPEND+=" dev-vcs/git-lfs" -else - DEPEND=">=dev-vcs/git-1.8.2.1[curl]" - [[ ${EGIT_LFS} ]] && DEPEND+=" dev-vcs/git-lfs" -fi +BDEPEND=">=dev-vcs/git-1.8.2.1[curl]" +[[ ${EGIT_LFS} ]] && BDEPEND+=" dev-vcs/git-lfs" # @ECLASS_VARIABLE: EGIT_CLONE_TYPE # @USER_VARIABLE diff --git a/eclass/gnome.org.eclass b/eclass/gnome.org.eclass index 760dc2ba0b66..70884edefef7 100644 --- a/eclass/gnome.org.eclass +++ b/eclass/gnome.org.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: gnome.org.eclass @@ -7,22 +7,19 @@ # @AUTHOR: # Authors: Spidler <spidler@gentoo.org> with help of carparski. # eclass variable additions and documentation: Gilles Dartiguelongue <eva@gentoo.org> -# @SUPPORTED_EAPIS: 5 6 7 8 +# @SUPPORTED_EAPIS: 7 8 # @BLURB: Helper eclass for gnome.org hosted archives # @DESCRIPTION: # Provide a default SRC_URI for tarball hosted on gnome.org mirrors. case ${EAPI} in - 5|6|7|8) ;; + 7|8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac if [[ -z ${_GNOME_ORG_ECLASS} ]] ; then _GNOME_ORG_ECLASS=1 -# versionator inherit kept for older EAPIs due to ebuilds (potentially) relying on it -[[ ${EAPI} == [56] ]] && inherit eapi7-ver versionator - # @ECLASS_VARIABLE: GNOME_TARBALL_SUFFIX # @PRE_INHERIT # @DESCRIPTION: @@ -33,19 +30,13 @@ _GNOME_ORG_ECLASS=1 # Even though xz-utils are in @system, they must still be added to BDEPEND; see # https://archives.gentoo.org/gentoo-dev/msg_a0d4833eb314d1be5d5802a3b710e0a4.xml -if [[ ${GNOME_TARBALL_SUFFIX} == "xz" ]]; then - if [[ ${EAPI} != [56] ]]; then - BDEPEND="app-arch/xz-utils" - else - DEPEND="app-arch/xz-utils" - fi -fi +[[ ${GNOME_TARBALL_SUFFIX} == "xz" ]] && BDEPEND="app-arch/xz-utils" # @ECLASS_VARIABLE: GNOME_ORG_MODULE # @DESCRIPTION: # Name of the module as hosted on gnome.org mirrors. # Leave unset if package name matches module name. -: "${GNOME_ORG_MODULE:=$PN}" +: "${GNOME_ORG_MODULE:=${PN}}" # @ECLASS_VARIABLE: GNOME_ORG_RELEASE # @INTERNAL diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass index bbee2a419dfc..dd4014c09bf7 100644 --- a/eclass/gnome2-utils.eclass +++ b/eclass/gnome2-utils.eclass @@ -4,7 +4,7 @@ # @ECLASS: gnome2-utils.eclass # @MAINTAINER: # gnome@gentoo.org -# @SUPPORTED_EAPIS: 5 6 7 8 +# @SUPPORTED_EAPIS: 7 8 # @PROVIDES: xdg-utils # @BLURB: Auxiliary functions commonly used by Gnome packages. # @DESCRIPTION: @@ -15,13 +15,12 @@ # * GConf schemas management # * scrollkeeper (old Gnome help system) management -[[ ${EAPI} == 5 ]] && inherit multilib # toolchain-funs.eclass: tc-is-cross-compiler # xdg-utils.eclass: xdg_environment_reset, xdg_icon_cache_update inherit toolchain-funcs xdg-utils case ${EAPI} in - 5|6|7|8) ;; + 7|8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac @@ -100,7 +99,7 @@ gnome2_environment_reset() { # Ensure we don't rely on dconf/gconf while building, bug #511946 export GSETTINGS_BACKEND="memory" - if has ${EAPI} 6 7; then + if [[ ${EAPI} == 7 ]]; then # Try to cover the packages honoring this variable, bug #508124 export GST_INSPECT="$(type -P true)" @@ -126,7 +125,7 @@ gnome2_gconf_savelist() { # using gconftool-2. # This function should be called from pkg_postinst. gnome2_gconf_install() { - local updater="${EROOT%/}${GCONFTOOL_BIN}" + local updater="${EROOT}${GCONFTOOL_BIN}" if [[ -z "${GNOME2_ECLASS_SCHEMAS}" ]]; then debug-print "No GNOME 2 GConf schemas found" @@ -148,15 +147,15 @@ gnome2_gconf_install() { # We are ready to install the GCONF Scheme now unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL - export GCONF_CONFIG_SOURCE="$("${updater}" --get-default-source | sed "s;:/;:${ROOT%/}/;")" + export GCONF_CONFIG_SOURCE="$("${updater}" --get-default-source | sed "s;:/;:${ROOT}/;")" einfo "Installing GNOME 2 GConf schemas" local F for F in ${GNOME2_ECLASS_SCHEMAS}; do - if [[ -e "${EROOT%/}/${F}" ]]; then + if [[ -e "${EROOT}/${F}" ]]; then debug-print "Installing schema: ${F}" - "${updater}" --makefile-install-rule "${EROOT%/}/${F}" 1>/dev/null + "${updater}" --makefile-install-rule "${EROOT}/${F}" 1>/dev/null fi done @@ -174,7 +173,7 @@ gnome2_gconf_install() { # Removes schema files previously installed by the current ebuild from Gconf's # database. gnome2_gconf_uninstall() { - local updater="${EROOT%/}${GCONFTOOL_BIN}" + local updater="${EROOT}${GCONFTOOL_BIN}" if [[ -z "${GNOME2_ECLASS_SCHEMAS}" ]]; then debug-print "No GNOME 2 GConf schemas found" @@ -194,15 +193,15 @@ gnome2_gconf_uninstall() { fi unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL - export GCONF_CONFIG_SOURCE="$("${updater}" --get-default-source | sed "s;:/;:${ROOT%/}/;")" + export GCONF_CONFIG_SOURCE="$("${updater}" --get-default-source | sed "s;:/;:${ROOT}/;")" einfo "Uninstalling GNOME 2 GConf schemas" local F for F in ${GNOME2_ECLASS_SCHEMAS}; do - if [[ -e "${EROOT%/}/${F}" ]]; then + if [[ -e "${EROOT}/${F}" ]]; then debug-print "Uninstalling gconf schema: ${F}" - "${updater}" --makefile-uninstall-rule "${EROOT%/}/${F}" 1>/dev/null + "${updater}" --makefile-uninstall-rule "${EROOT}/${F}" 1>/dev/null fi done @@ -221,31 +220,29 @@ gnome2_gconf_uninstall() { # calls to scrollkeeper-update and sandbox violations. # This function should be called from src_prepare. gnome2_omf_fix() { - local omf_makefiles filename - - omf_makefiles="$@" + local omf_makefiles=( "$@" ) if [[ -f ${S}/omf.make ]] ; then - omf_makefiles="${omf_makefiles} ${S}/omf.make" + omf_makefiles+=( "${S}"/omf.make ) fi if [[ -f ${S}/gnome-doc-utils.make ]] ; then - omf_makefiles="${omf_makefiles} ${S}/gnome-doc-utils.make" + omf_makefiles+=( "${S}"/gnome-doc-utils.make ) fi # testing fixing of all makefiles found # The sort is important to ensure .am is listed before the respective .in for # maintainer mode regeneration not kicking in due to .am being newer than .in - for filename in $(find "${S}" -name "Makefile.in" -o -name "Makefile.am" |sort) ; do - omf_makefiles="${omf_makefiles} ${filename}" - done + local filename + while IFS="" read -r filename ; do + omf_makefiles+=( "${filename}" ) + done < <(find "${S}" -name "Makefile.in" -o -name "Makefile.am" | sort) ebegin "Fixing OMF Makefiles" - local retval=0 + local omf retval=0 local fails=( ) - - for omf in ${omf_makefiles} ; do + for omf in "${omf_makefiles[@]}" ; do sed -i -e 's:scrollkeeper-update:true:' "${omf}" retval=$? @@ -253,7 +250,7 @@ gnome2_omf_fix() { debug-print "updating of ${omf} failed" # Add to the list of failures - fails[$(( ${#fails[@]} + 1 ))]=$omf + fails+=( "${omf}" ) retval=2 fi @@ -261,6 +258,7 @@ gnome2_omf_fix() { eend $retval + local f for f in "${fails[@]}" ; do eerror "Failed to update OMF Makefile $f" done @@ -282,7 +280,7 @@ gnome2_scrollkeeper_savelist() { # Updates the global scrollkeeper database. # This function should be called from pkg_postinst and pkg_postrm. gnome2_scrollkeeper_update() { - local updater="${EROOT%/}${SCROLLKEEPER_UPDATE_BIN}" + local updater="${EROOT}${SCROLLKEEPER_UPDATE_BIN}" if [[ -z "${GNOME2_ECLASS_SCROLLS}" ]]; then debug-print "No scroll cache to update" @@ -303,7 +301,7 @@ gnome2_scrollkeeper_update() { fi ebegin "Updating scrollkeeper database ..." - "${updater}" -q -p "${EROOT%/}${SCROLLKEEPER_DIR}" + "${updater}" -q -p "${EROOT}${SCROLLKEEPER_DIR}" eend $? } @@ -324,7 +322,7 @@ gnome2_schemas_savelist() { # Updates GSettings schemas. # This function should be called from pkg_postinst and pkg_postrm. gnome2_schemas_update() { - local updater="${EROOT%/}${GLIB_COMPILE_SCHEMAS}" + local updater="${EROOT}${GLIB_COMPILE_SCHEMAS}" if tc-is-cross-compiler ; then ewarn "Updating of GSettings schemas skipped due to cross-compilation." @@ -340,7 +338,7 @@ gnome2_schemas_update() { fi ebegin "Updating GSettings schemas" - ${updater} --allow-any-name "$@" "${EROOT%/}/usr/share/glib-2.0/schemas" &>/dev/null + ${updater} --allow-any-name "$@" "${EROOT}/usr/share/glib-2.0/schemas" &>/dev/null eend $? } @@ -360,8 +358,8 @@ gnome2_gdk_pixbuf_savelist() { # Updates gdk-pixbuf loader cache if GNOME2_ECLASS_GDK_PIXBUF_LOADERS has some. # This function should be called from pkg_postinst and pkg_postrm. gnome2_gdk_pixbuf_update() { - local updater="${EROOT%/}/usr/bin/${CHOST}-gdk-pixbuf-query-loaders" - [[ -x ${updater} ]] || updater="${EROOT%/}/usr/bin/gdk-pixbuf-query-loaders" + local updater="${EROOT}/usr/bin/${CHOST}-gdk-pixbuf-query-loaders" + [[ -x ${updater} ]] || updater="${EROOT}/usr/bin/gdk-pixbuf-query-loaders" if tc-is-cross-compiler ; then ewarn "Updating of gdk-pixbuf loader cache skipped due to cross-compilation." @@ -380,7 +378,7 @@ gnome2_gdk_pixbuf_update() { local tmp_file=$(mktemp "${T}"/tmp.XXXXXXXXXX) || die "Failed to create temporary file" ${updater} 1> "${tmp_file}" && chmod 0644 "${tmp_file}" && - cp -f "${tmp_file}" "${EROOT%/}/usr/$(get_libdir)/gdk-pixbuf-2.0/2.10.0/loaders.cache" && + cp -f "${tmp_file}" "${EROOT}/usr/$(get_libdir)/gdk-pixbuf-2.0/2.10.0/loaders.cache" && rm "${tmp_file}" # don't replace this with mv, required for SELinux support eend $? } @@ -398,7 +396,7 @@ gnome2_query_immodules_gtk2() { fi ebegin "Updating gtk2 input method module cache" - GTK_IM_MODULE_FILE="${EROOT%/}/usr/$(get_libdir)/gtk-2.0/2.10.0/immodules.cache" \ + GTK_IM_MODULE_FILE="${EROOT}/usr/$(get_libdir)/gtk-2.0/2.10.0/immodules.cache" \ "${updater}" --update-cache eend $? } @@ -416,7 +414,7 @@ gnome2_query_immodules_gtk3() { fi ebegin "Updating gtk3 input method module cache" - GTK_IM_MODULE_FILE="${EROOT%/}/usr/$(get_libdir)/gtk-3.0/3.0.0/immodules.cache" \ + GTK_IM_MODULE_FILE="${EROOT}/usr/$(get_libdir)/gtk-3.0/3.0.0/immodules.cache" \ "${updater}" --update-cache eend $? } @@ -426,8 +424,8 @@ gnome2_query_immodules_gtk3() { # Updates glib's gio modules cache. # This function should be called from pkg_postinst and pkg_postrm. gnome2_giomodule_cache_update() { - local updater="${EROOT%/}/usr/bin/${CHOST}-gio-querymodules" - [[ -x ${updater} ]] || updater="${EROOT%/}/usr/bin/gio-querymodules" + local updater="${EROOT}/usr/bin/${CHOST}-gio-querymodules" + [[ -x ${updater} ]] || updater="${EROOT}/usr/bin/gio-querymodules" if tc-is-cross-compiler ; then ewarn "Updating of GIO modules cache skipped due to cross-compilation." @@ -443,7 +441,7 @@ gnome2_giomodule_cache_update() { fi ebegin "Updating GIO modules cache" - ${updater} "${EROOT%/}"/usr/$(get_libdir)/gio/modules + ${updater} "${EROOT}"/usr/$(get_libdir)/gio/modules eend $? } @@ -486,30 +484,3 @@ gnome2_disable_deprecation_warning() { ewarn "Failed to disable deprecation warnings in ${makefile}" done } - -case ${EAPI} in -5|6) - -# @FUNCTION: gnome2_icon_savelist -# @DESCRIPTION: -# Find the icons that are about to be installed and save their location -# in the GNOME2_ECLASS_ICONS environment variable. This is only -# necessary for eclass implementations that call -# gnome2_icon_cache_update conditionally. -# This function should be called from pkg_preinst. -gnome2_icon_savelist() { - pushd "${ED}" > /dev/null || die - export GNOME2_ECLASS_ICONS=$(find 'usr/share/icons' -maxdepth 1 -mindepth 1 -type d 2> /dev/null) - popd > /dev/null || die -} - -# @FUNCTION: gnome2_icon_cache_update -# @DESCRIPTION: -# Updates Gtk+ icon cache files under /usr/share/icons. -# Deprecated. Please use xdg_icon_cache_update from xdg-utils.eclass -gnome2_icon_cache_update() { - xdg_icon_cache_update -} - -;; -esac diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass index 66de2df97f9f..9ef5d92a1c9e 100644 --- a/eclass/gnome2.eclass +++ b/eclass/gnome2.eclass @@ -4,7 +4,7 @@ # @ECLASS: gnome2.eclass # @MAINTAINER: # gnome@gentoo.org -# @SUPPORTED_EAPIS: 6 7 8 +# @SUPPORTED_EAPIS: 7 8 # @PROVIDES: gnome2-utils # @BLURB: Provides phases for Gnome/Gtk+ based packages. # @DESCRIPTION: @@ -12,7 +12,7 @@ # GNOME framework. For additional functions, see gnome2-utils.eclass. case ${EAPI} in - 6|7|8) ;; + 7|8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac @@ -22,11 +22,9 @@ _GNOME2_ECLASS=1 # @ECLASS_VARIABLE: GNOME2_EAUTORECONF # @DEFAULT_UNSET # @DESCRIPTION: -# Run eautoreconf instead of only elibtoolize -GNOME2_EAUTORECONF=${GNOME2_EAUTORECONF:-""} +# Run eautoreconf instead of only elibtoolize if set to "yes". [[ ${GNOME2_EAUTORECONF} == yes ]] && inherit autotools -[[ ${EAPI} == 6 ]] && inherit ltprune inherit libtool gnome.org gnome2-utils xdg @@ -34,7 +32,6 @@ inherit libtool gnome.org gnome2-utils xdg # @DEFAULT_UNSET # @DESCRIPTION: # Extra options passed to elibtoolize -ELTCONF=${ELTCONF:-""} # @ECLASS_VARIABLE: GNOME2_ECLASS_GIO_MODULES # @INTERNAL @@ -42,13 +39,10 @@ ELTCONF=${ELTCONF:-""} # Array containing glib GIO modules # @ECLASS_VARIABLE: GNOME2_LA_PUNT +# @DEFAULT_UNSET # @DESCRIPTION: -# In EAPI 6, it relies on prune_libtool_files (from ltprune.eclass) for -# this. Later EAPIs use find ... -delete. Available values for GNOME2_LA_PUNT: -# - "no": will not clean any .la files -# - "yes": will run prune_libtool_files --modules -# - If it is not set, it will run prune_libtool_files -GNOME2_LA_PUNT=${GNOME2_LA_PUNT:-""} +# If set to "no", no .la files will be cleaned, otherwise +# will run "find ... -delete" in src_install. # @FUNCTION: gnome2_src_prepare # @DESCRIPTION: @@ -141,8 +135,7 @@ gnome2_src_install() { export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL="1" local sk_tmp_dir="/var/lib/scrollkeeper" - # scrollkeeper-update from rarian doesn't do anything. Then, since eapi6 - # we stop taking care of it + # scrollkeeper-update from rarian doesn't do anything. # # if this is not present, scrollkeeper-update may segfault and # create bogus directories in /var/lib/ @@ -150,9 +143,8 @@ gnome2_src_install() { unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL - # Handle documentation as 'default' for eapi5, bug #373131 - # Since eapi6 this is handled by default on its own plus MAINTAINERS and HACKING - # files that are really common in gnome packages (bug #573390) + # Install MAINTAINERS and HACKING which are really common + # in gnome packages (bug #573390) local d for d in HACKING MAINTAINERS; do [[ -s ${d} ]] && dodoc "${d}" @@ -170,16 +162,8 @@ gnome2_src_install() { rm -rf "${ED}/usr/share/applications/mimeinfo.cache" || die # Delete all .la files - if has ${EAPI} 6; then - case "${GNOME2_LA_PUNT}" in - yes) prune_libtool_files --modules;; - no) ;; - *) prune_libtool_files;; - esac - else - if [[ ${GNOME2_LA_PUNT} != 'no' ]]; then - find "${ED}" -name '*.la' -delete || die - fi + if [[ ${GNOME2_LA_PUNT} != no ]]; then + find "${ED}" -type f -name '*.la' -delete || die fi } diff --git a/eclass/go-env.eclass b/eclass/go-env.eclass index 1a2c9787a146..be131133113b 100644 --- a/eclass/go-env.eclass +++ b/eclass/go-env.eclass @@ -6,11 +6,17 @@ # Flatcar Linux Maintainers <infra@flatcar-linux.org> # @AUTHOR: # Flatcar Linux Maintainers <infra@flatcar-linux.org> +# @SUPPORTED_EAPIS: 7 8 # @BLURB: Helper eclass for setting the Go compile environment. Required for cross-compiling. # @DESCRIPTION: # This eclass includes helper functions for setting the compile environment for Go ebuilds. # Intended to be called by other Go eclasses in an early build stage, e.g. src_unpack. +case ${EAPI} in + 7|8) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + if [[ -z ${_GO_ENV_ECLASS} ]]; then _GO_ENV_ECLASS=1 @@ -34,14 +40,7 @@ go-env_set_compile_environment() { use x86 && export GO386=$(go-env_go386) # XXX: Hack for checking ICE (bug #912152, gcc PR113204) - case ${EAPI} in - 6) - has_version "sys-devel/gcc[debug]" && filter-lto - ;; - *) - has_version -b "sys-devel/gcc[debug]" && filter-lto - ;; - esac + has_version -b "sys-devel/gcc[debug]" && filter-lto export CGO_CFLAGS="${CGO_CFLAGS:-$CFLAGS}" export CGO_CPPFLAGS="${CGO_CPPFLAGS:-$CPPFLAGS}" @@ -49,26 +48,46 @@ go-env_set_compile_environment() { export CGO_LDFLAGS="${CGO_LDFLAGS:-$LDFLAGS}" } +# @FUNCTION: go-env_goos +# @USAGE: [toolchain prefix] +# @DESCRIPTION: +# Returns the appropriate GOOS setting for the target operating system. +go-env_goos() { + local target=${1:-${CHOST}} + case "${target}" in + *-linux*) echo linux ;; + *-darwin*) echo darwin ;; + *-freebsd*) echo freebsd ;; + *-netbsd*) echo netbsd ;; + *-openbsd*) echo openbsd ;; + *-solaris*) echo solaris ;; + *-cygwin*|*-interix*|*-winnt*) echo windows ;; + *) die "unknown GOOS for ${target}" ;; + esac +} + # @FUNCTION: go-env_goarch # @USAGE: [toolchain prefix] # @DESCRIPTION: # Returns the appropriate GOARCH setting for the target architecture. go-env_goarch() { - # By chance most portage arch names match Go - local tc_arch=$(tc-arch $@) - case "${tc_arch}" in - x86) echo 386;; - x64-*) echo amd64;; - loong) echo loong64;; - mips) if use abi_mips_o32; then - [[ $(tc-endian $@) = big ]] && echo mips || echo mipsle - elif use abi_mips_n64; then - [[ $(tc-endian $@) = big ]] && echo mips64 || echo mips64le - fi ;; - ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;; - riscv) echo riscv64 ;; - s390) echo s390x ;; - *) echo "${tc_arch}";; + local target=${1:-${CHOST}} + # Some Portage arch names match Go. + local arch=$(tc-arch "${target}") cpu=${target%%-*} + case "${arch}" in + x86) echo 386 ;; + loong) echo loong64 ;; + *) case "${cpu}" in + aarch64*be) echo arm64be ;; + arm64) echo arm64 ;; + arm*b*) echo armbe ;; + mips64*l*) echo mips64le ;; + mips*l*) echo mipsle ;; + powerpc64le*) echo ppc64le ;; + arm64|s390x) echo "${cpu}" ;; + mips64*|riscv64*|sparc64*) echo "${arch}64" ;; + *) echo "${arch}" ;; + esac ;; esac } diff --git a/eclass/golang-base.eclass b/eclass/golang-base.eclass index 4bba00200cfc..a2996e3b0683 100644 --- a/eclass/golang-base.eclass +++ b/eclass/golang-base.eclass @@ -1,10 +1,10 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: golang-base.eclass # @MAINTAINER: # William Hubbs <williamh@gentoo.org> -# @SUPPORTED_EAPIS: 5 6 7 +# @SUPPORTED_EAPIS: 7 # @BLURB: Eclass that provides base functions for Go packages. # @DEPRECATED: go-module.eclass # @DESCRIPTION: @@ -12,12 +12,9 @@ # programming language; it also provides the build-time dependency on # dev-lang/go. -case "${EAPI:-0}" in - 5|6|7) - ;; - *) - die "${ECLASS}: Unsupported EAPI (EAPI=${EAPI})" - ;; +case ${EAPI} in + 7) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac if [[ -z ${_GOLANG_BASE} ]]; then diff --git a/eclass/golang-build.eclass b/eclass/golang-build.eclass index 235313bd70f5..b5218ce36572 100644 --- a/eclass/golang-build.eclass +++ b/eclass/golang-build.eclass @@ -1,10 +1,10 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: golang-build.eclass # @MAINTAINER: # William Hubbs <williamh@gentoo.org> -# @SUPPORTED_EAPIS: 6 7 +# @SUPPORTED_EAPIS: 7 # @PROVIDES: golang-base # @BLURB: Eclass for compiling go packages. # @DEPRECATED: go-module.eclass @@ -13,7 +13,7 @@ # functions for software written in the Go programming language. case ${EAPI} in - 6|7) ;; + 7) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac diff --git a/eclass/golang-vcs-snapshot.eclass b/eclass/golang-vcs-snapshot.eclass index d34b8a6e913d..a91ddbbe3615 100644 --- a/eclass/golang-vcs-snapshot.eclass +++ b/eclass/golang-vcs-snapshot.eclass @@ -1,10 +1,10 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: golang-vcs-snapshot.eclass # @MAINTAINER: # William Hubbs <williamh@gentoo.org> -# @SUPPORTED_EAPIS: 6 7 +# @SUPPORTED_EAPIS: 7 # @PROVIDES: golang-base # @BLURB: eclass to unpack VCS snapshot tarballs for Go software # @DEPRECATED: go-module.eclass @@ -45,7 +45,7 @@ # and add the vendored tarballs to ${WORKDIR}/src/${EGO_PN}/vendor case ${EAPI} in - 6|7) ;; + 7) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac diff --git a/eclass/golang-vcs.eclass b/eclass/golang-vcs.eclass index 6f7a837bc15f..dee040505d23 100644 --- a/eclass/golang-vcs.eclass +++ b/eclass/golang-vcs.eclass @@ -1,10 +1,10 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: golang-vcs.eclass # @MAINTAINER: # William Hubbs <williamh@gentoo.org> -# @SUPPORTED_EAPIS: 6 7 +# @SUPPORTED_EAPIS: 7 # @PROVIDES: golang-base # @BLURB: Eclass for fetching and unpacking go repositories. # @DEPRECATED: go-module.eclass @@ -13,7 +13,7 @@ # of software written in the Go programming language. case ${EAPI} in - 6|7) ;; + 7) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass index ffbe986f3e87..c60fcb04dd73 100644 --- a/eclass/kernel-2.eclass +++ b/eclass/kernel-2.eclass @@ -1332,7 +1332,7 @@ getfilevar() { unset ARCH echo -e "include ${basefname}\ne:\n\t@echo \$(${1})" | - make -C "${basedname}" ${BUILD_FIXES} -s -f - e 2>/dev/null + make -C "${basedname}" -s -f - e 2>/dev/null ARCH=${xarch} fi diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass index 86c7cd4a172d..d8e50e75812f 100644 --- a/eclass/kernel-build.eclass +++ b/eclass/kernel-build.eclass @@ -20,6 +20,14 @@ # the kernel and installing it along with its modules and subset # of sources needed to build external modules. +# @ECLASS_VARIABLE: KV_FULL +# @DEFAULT_UNSET +# @DESCRIPTION: +# A string containing the full kernel release version, e.g. +# '6.9.6-gentoo-dist'. This is used to ensure consistency between the +# kernel's release version and Gentoo's tooling. This is set by +# kernel-build_src_configure() once we have a kernel.release file. + case ${EAPI} in 8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; @@ -28,7 +36,7 @@ esac if [[ ! ${_KERNEL_BUILD_ECLASS} ]]; then _KERNEL_BUILD_ECLASS=1 -PYTHON_COMPAT=( python3_{10..12} ) +PYTHON_COMPAT=( python3_{10..13} ) if [[ ${KERNEL_IUSE_MODULES_SIGN} ]]; then inherit secureboot fi @@ -225,6 +233,33 @@ kernel-build_src_configure() { emake O="${WORKDIR}"/modprep "${MAKEARGS[@]}" olddefconfig emake O="${WORKDIR}"/modprep "${MAKEARGS[@]}" modules_prepare cp -pR "${WORKDIR}"/modprep "${WORKDIR}"/build || die + + # Now that we have a release file, set KV_FULL + local relfile=${WORKDIR}/build/include/config/kernel.release + if [[ -z ${KV_FULL} ]]; then + KV_FULL=$(<"${relfile}") || die + fi + + # Make sure we are about to build the correct kernel + if [[ ${PV} != *9999 ]]; then + local expected_ver=$(dist-kernel_PV_to_KV "${PV}") + local expected_rel=$(<"${relfile}") + + if [[ ${KV_FULL} != ${expected_rel} ]]; then + eerror "KV_FULL mismatch!" + eerror "KV_FULL: ${KV_FULL}" + eerror "Expected: ${expected_rel}" + die "KV_FULL mismatch: got ${KV_FULL}, expected ${expected_rel}" + fi + + if [[ ${KV_FULL} != ${expected_ver}* ]]; then + eerror "Kernel version does not match PV!" + eerror "Source version: ${KV_FULL}" + eerror "Expected (PV*): ${expected_ver}*" + eerror "Please ensure you are applying the correct patchset." + die "Kernel version mismatch: got ${KV_FULL}, expected ${expected_ver}*" + fi + fi } # @FUNCTION: kernel-build_src_compile @@ -254,20 +289,15 @@ kernel-build_src_test() { INSTALL_MOD_PATH="${T}" INSTALL_MOD_STRIP="${strip_args}" \ modules_install - local dir_ver=${PV}${KV_LOCALVERSION} - local relfile=${WORKDIR}/build/include/config/kernel.release - local module_ver - module_ver=$(<"${relfile}") || die - - kernel-install_test "${module_ver}" \ + kernel-install_test "${KV_FULL}" \ "${WORKDIR}/build/$(dist-kernel_get_image_path)" \ - "${T}/lib/modules/${module_ver}" + "${T}/lib/modules/${KV_FULL}" } # @FUNCTION: kernel-build_src_install # @DESCRIPTION: # Install the built kernel along with subset of sources -# into /usr/src/linux-${PV}. Install the modules. Save the config. +# into /usr/src/linux-${KV_FULL}. Install the modules. Save the config. kernel-build_src_install() { debug-print-function ${FUNCNAME} "${@}" @@ -304,8 +334,7 @@ kernel-build_src_install() { # note: we're using mv rather than doins to save space and time # install main and arch-specific headers first, and scripts local kern_arch=$(tc-arch-kernel) - local dir_ver=${PV}${KV_LOCALVERSION} - local kernel_dir=/usr/src/linux-${dir_ver} + local kernel_dir=/usr/src/linux-${KV_FULL} if use sparc ; then # We don't want tc-arch-kernel's sparc64, even though we do @@ -378,10 +407,6 @@ kernel-build_src_install() { # strip empty directories find "${D}" -type d -empty -exec rmdir {} + || die - local relfile=${ED}${kernel_dir}/include/config/kernel.release - local module_ver - module_ver=$(<"${relfile}") || die - # warn when trying to "make" a dist-kernel cat <<-EOF >> "${ED}${kernel_dir}/Makefile" || die @@ -399,12 +424,12 @@ kernel-build_src_install() { echo "${CATEGORY}/${PF}:${SLOT}" > "${ED}${kernel_dir}/dist-kernel" || die # fix source tree and build dir symlinks - dosym "../../../${kernel_dir}" "/lib/modules/${module_ver}/build" - dosym "../../../${kernel_dir}" "/lib/modules/${module_ver}/source" + dosym "../../../${kernel_dir}" "/lib/modules/${KV_FULL}/build" + dosym "../../../${kernel_dir}" "/lib/modules/${KV_FULL}/source" if [[ "${image_path}" == *vmlinux* ]]; then - dosym "../../../${kernel_dir}/${image_path}" "/lib/modules/${module_ver}/vmlinux" + dosym "../../../${kernel_dir}/${image_path}" "/lib/modules/${KV_FULL}/vmlinux" else - dosym "../../../${kernel_dir}/${image_path}" "/lib/modules/${module_ver}/vmlinuz" + dosym "../../../${kernel_dir}/${image_path}" "/lib/modules/${KV_FULL}/vmlinuz" fi if [[ ${KERNEL_IUSE_MODULES_SIGN} ]]; then @@ -435,7 +460,7 @@ kernel-build_src_install() { --conf "${T}/empty-file" --confdir "${T}/empty-directory" --kernel-image "${image}" - --kmoddir "${ED}/lib/modules/${dir_ver}" + --kmoddir "${ED}/lib/modules/${KV_FULL}" --kver "${dir_ver}" --verbose --compress="xz -9e --check=crc32" @@ -462,7 +487,7 @@ kernel-build_src_install() { --linux="${image}" --initrd="${image%/*}/initrd" --cmdline="${KERNEL_GENERIC_UKI_CMDLINE}" - --uname="${dir_ver}" + --uname="${KV_FULL}" --output="${image%/*}/uki.efi" ) @@ -520,7 +545,7 @@ kernel-build_pkg_postinst() { ewarn ewarn "MODULES_SIGN_KEY was not set, this means the kernel build system" ewarn "automatically generated the signing key. This key was installed" - ewarn "in ${EROOT}/usr/src/linux-${PV}${KV_LOCALVERSION}/certs" + ewarn "in ${EROOT}/usr/src/linux-${KV_FULL}/certs" ewarn "and will also be included in any binary packages." ewarn "Please take appropriate action to protect the key!" ewarn diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass index 77570a905ce1..e6f0b404dcaa 100644 --- a/eclass/kernel-install.eclass +++ b/eclass/kernel-install.eclass @@ -26,6 +26,15 @@ # If set to a non-null value, adds IUSE=generic-uki and required # logic to install a generic unified kernel image. +# @ECLASS_VARIABLE: KV_FULL +# @DEFAULT_UNSET +# @DESCRIPTION: +# A string containing the full kernel release version, e.g. +# '6.9.6-gentoo-dist'. Defaults to ${PV}${KV_LOCALVERSION}, +# but can be set by the ebuild when this default value does +# not match the kernel release. kernel-build.eclass sets this +# to whatever is in the built kernel's kernel.release file. + # @ECLASS_VARIABLE: KV_LOCALVERSION # @DEFAULT_UNSET # @DESCRIPTION: @@ -63,7 +72,10 @@ _IDEPEND_BASE=" >=sys-kernel/installkernel-14 ) initramfs? ( - >=sys-kernel/installkernel-14[dracut(-)] + || ( + >=sys-kernel/installkernel-14[dracut(-)] + >=sys-kernel/installkernel-14[ugrd(-)] + ) ) " @@ -190,7 +202,7 @@ if [[ ${KERNEL_IUSE_GENERIC_UKI} ]]; then " IDEPEND=" generic-uki? ( - >=sys-kernel/installkernel-14[-dracut(-),-ukify(-)] + >=sys-kernel/installkernel-14[-dracut(-),-ugrd(-),-ukify(-)] ) !generic-uki? ( ${_IDEPEND_BASE} @@ -543,16 +555,26 @@ kernel-install_pkg_pretend() { if ! use initramfs && ! has_version "${CATEGORY}/${PN}[-initramfs]"; then ewarn - ewarn "WARNING: The standard configuration of the Gentoo distribution" - ewarn "kernels requires an initramfs! You have disabled the initramfs" - ewarn "USE flag and as a result dracut was not pulled in as a dependency." - ewarn "Please ensure that you are either overriding the standard" - ewarn "configuration or that an alternative initramfs generation plugin" - ewarn "is installed for your installkernel implementation!" - ewarn - ewarn "This is an advanced use case, you are on your own to ensure" - ewarn "that your system is bootable!" + ewarn "WARNING: The default distribution kernel configuration is designed" + ewarn "to be used with an initramfs! Although possible, there is no guarantee" + ewarn "that distribution kernels will boot without an initramfs." ewarn + ewarn "You have disabled the initramfs USE flag, and as a result the package manager" + ewarn "will not enforce the configuration of an initramfs generator in" + ewarn "sys-kernel/installkernel." + ewarn + ewarn "If you wish to use a custom initramfs generator, then please ensure that" + ewarn "/sbin/installkernel is capable of calling it via a kernel installation hook," + ewarn "and is also configured to use it via /etc/kernel/install.conf." + ewarn + ewarn "If you wish to boot without an initramfs, then please ensure that" + ewarn "all kernel drivers required to boot your system are built into the" + ewarn "kernel by modifying the default distribution kernel configuration" + ewarn "using /etc/kernel/config.d" + ewarn + ewarn "Please refer to the installkernel and distribution kernel documentation:" + ewarn " https://wiki.gentoo.org/wiki/Installkernel" + ewarn " https://wiki.gentoo.org/wiki/Project:Distribution_Kernel" fi } @@ -571,40 +593,40 @@ kernel-install_src_test() { kernel-install_pkg_preinst() { debug-print-function ${FUNCNAME} "${@}" - local dir_ver=${PV}${KV_LOCALVERSION} - local kernel_dir=${ED}/usr/src/linux-${dir_ver} - local relfile=${kernel_dir}/include/config/kernel.release + # Set KV_FULL to ${PV}${KV_LOCALVERSION} if it hasn't + # been set elsewhere for backward compatibility with existing + # bin-kernel packages + if [[ -z ${KV_FULL} ]]; then + KV_FULL=${PV}${KV_LOCALVERSION} + fi + + local kernel_dir=${ED}/usr/src/linux-${KV_FULL} local image_path=$(dist-kernel_get_image_path) [[ ! -d ${kernel_dir} ]] && die "Kernel directory ${kernel_dir} not installed!" - [[ ! -f ${relfile} ]] && - die "Release file ${relfile} not installed!" - local release - release="$(<"${relfile}")" || die - DIST_KERNEL_RELEASE="${release}" # perform the version check for release ebuilds only if [[ ${PV} != *9999 ]]; then local expected_ver=$(dist-kernel_PV_to_KV "${PV}") - if [[ ${release} != ${expected_ver}* ]]; then - eerror "Kernel release mismatch!" - eerror " expected (PV): ${expected_ver}*" - eerror " found: ${release}" - eerror "Please verify that you are applying the correct patches." - die "Kernel release mismatch (${release} instead of ${expected_ver}*)" + if [[ ${KV_FULL} != ${expected_ver}* ]]; then + eerror "Kernel version does not match PV!" + eerror "Source version: ${KV_FULL}" + eerror "Expected (PV*): ${expected_ver}*" + eerror "Please ensure you are applying the correct patchset." + die "Kernel version mismatch: got ${KV_FULL}, expected ${expected_ver}*" fi fi if [[ -L ${EROOT}/lib && ${EROOT}/lib -ef ${EROOT}/usr/lib ]]; then # Adjust symlinks for merged-usr. - rm "${ED}/lib/modules/${release}"/{build,source} || die - dosym "../../../src/linux-${dir_ver}" "/usr/lib/modules/${release}/build" - dosym "../../../src/linux-${dir_ver}" "/usr/lib/modules/${release}/source" + rm "${ED}/lib/modules/${KV_FULL}"/{build,source} || die + dosym "../../../src/linux-${KV_FULL}" "/usr/lib/modules/${KV_FULL}/build" + dosym "../../../src/linux-${KV_FULL}" "/usr/lib/modules/${KV_FULL}/source" for file in vmlinux vmlinuz; do - if [[ -L "${ED}/lib/modules/${release}/${file}" ]]; then - rm "${ED}/lib/modules/${release}/${file}" || die - dosym "../../../src/linux-${dir_ver}/${image_path}" "/usr/lib/modules/${release}/${file}" + if [[ -L "${ED}/lib/modules/${KV_FULL}/${file}" ]]; then + rm "${ED}/lib/modules/${KV_FULL}/${file}" || die + dosym "../../../src/linux-${KV_FULL}/${image_path}" "/usr/lib/modules/${KV_FULL}/${file}" fi done fi @@ -678,13 +700,12 @@ kernel-install_install_all() { kernel-install_pkg_postinst() { debug-print-function ${FUNCNAME} "${@}" - local dir_ver=${PV}${KV_LOCALVERSION} - kernel-install_update_symlink "${EROOT}/usr/src/linux" "${dir_ver}" + kernel-install_update_symlink "${EROOT}/usr/src/linux" "${KV_FULL}" dist-kernel_compressed_module_cleanup \ - "${EROOT}/lib/modules/${DIST_KERNEL_RELEASE}" + "${EROOT}/lib/modules/${KV_FULL}" if [[ -z ${ROOT} ]]; then - kernel-install_install_all "${dir_ver}" + kernel-install_install_all "${KV_FULL}" fi if [[ ${KERNEL_IUSE_GENERIC_UKI} ]] && use generic-uki; then @@ -708,8 +729,7 @@ kernel-install_pkg_postrm() { debug-print-function ${FUNCNAME} "${@}" if [[ -z ${ROOT} && ! ${KERNEL_IUSE_GENERIC_UKI} ]]; then - local dir_ver=${PV}${KV_LOCALVERSION} - local kernel_dir=${EROOT}/usr/src/linux-${dir_ver} + local kernel_dir=${EROOT}/usr/src/linux-${KV_FULL} local image_path=$(dist-kernel_get_image_path) ebegin "Removing initramfs" rm -f "${kernel_dir}/${image_path%/*}"/{initrd,uki.efi} && @@ -724,7 +744,11 @@ kernel-install_pkg_postrm() { kernel-install_pkg_config() { [[ -z ${ROOT} ]] || die "ROOT!=/ not supported currently" - kernel-install_install_all "${PV}${KV_LOCALVERSION}" + if [[ -z ${KV_FULL} ]]; then + KV_FULL=${PV}${KV_LOCALVERSION} + fi + + kernel-install_install_all "${KV_FULL}" } # @FUNCTION: kernel-install_compress_modules diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass index 9449a6359d2a..0f6138150144 100644 --- a/eclass/linux-info.eclass +++ b/eclass/linux-info.eclass @@ -6,7 +6,7 @@ # kernel@gentoo.org # @AUTHOR: # Original author: John Mylchreest <johnm@gentoo.org> -# @SUPPORTED_EAPIS: 6 7 8 +# @SUPPORTED_EAPIS: 7 8 # @BLURB: eclass used for accessing kernel related information # @DESCRIPTION: # This eclass is used as a central eclass for accessing kernel @@ -28,7 +28,7 @@ # get_running_version case ${EAPI} in - 6|7|8) ;; + 7|8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac @@ -38,7 +38,6 @@ _LINUX_INFO_ECLASS=1 # A Couple of env vars are available to effect usage of this eclass # These are as follows: - # @ECLASS_VARIABLE: CHECKCONFIG_DONOTHING # @USER_VARIABLE # @DEFAULT_UNSET @@ -51,7 +50,7 @@ _LINUX_INFO_ECLASS=1 # @DESCRIPTION: # A string containing the directory of the target kernel sources. The default value is # "/usr/src/linux" -KERNEL_DIR="${KERNEL_DIR:-${ROOT%/}/usr/src/linux}" +KERNEL_DIR="${KERNEL_DIR:-${ROOT}/usr/src/linux}" # @ECLASS_VARIABLE: CONFIG_CHECK # @DEFAULT_UNSET @@ -88,7 +87,6 @@ KERNEL_DIR="${KERNEL_DIR:-${ROOT%/}/usr/src/linux}" # CONFIG_CHECK="~CFG" with ERROR_<CFG>="Error Message" calls eerror without dying # CONFIG_CHECK="~CFG" with WARNING_<CFG>="Warning Message" calls ewarn without dying - # @ECLASS_VARIABLE: KBUILD_OUTPUT # @DEFAULT_UNSET # @DESCRIPTION: @@ -168,13 +166,6 @@ KERNEL_DIR="${KERNEL_DIR:-${ROOT%/}/usr/src/linux}" # And to ensure all the weirdness with crosscompile inherit toolchain-funcs -[[ ${EAPI} == 6 ]] && inherit eapi7-ver - -# bug #75034 -case ${ARCH} in - ppc) BUILD_FIXES="${BUILD_FIXES} TOUT=${T}/.tmp_gas_check";; - ppc64) BUILD_FIXES="${BUILD_FIXES} TOUT=${T}/.tmp_gas_check";; -esac # @FUNCTION: set_arch_to_kernel # @DESCRIPTION: @@ -248,8 +239,7 @@ getfilevar() { # Pass dot-config=0 to avoid the config check in kernels prior to 5.4. echo -e "e:\\n\\t@echo \$(${1})\\ninclude ${basefname}" | \ nonfatal emake -C "${basedname}" --no-print-directory M="${T}" \ - dot-config=0 need-config= need-compiler= \ - ${BUILD_FIXES} -s -f - 2>/dev/null + dot-config=0 need-config= need-compiler= -s -f - 2>/dev/null ARCH=${myARCH} fi @@ -642,7 +632,7 @@ get_version() { # caught before this if they are. if [[ -z ${OUTPUT_DIR} ]] ; then # Try to locate a kernel that is most relevant for us. - for OUTPUT_DIR in "${SYSROOT}" "${ROOT%/}" "" ; do + for OUTPUT_DIR in "${SYSROOT}" "${ROOT}" "" ; do OUTPUT_DIR+="/lib/modules/${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${KV_EXTRA}${KV_LOCAL}/build" if [[ -e ${OUTPUT_DIR} ]] ; then break @@ -670,10 +660,10 @@ get_running_version() { local kv=$(uname -r) - if [[ -f ${ROOT%/}/lib/modules/${kv}/source/Makefile ]]; then - KERNEL_DIR=$(readlink -f "${ROOT%/}/lib/modules/${kv}/source") - if [[ -f ${ROOT%/}/lib/modules/${kv}/build/Makefile ]]; then - KBUILD_OUTPUT=$(readlink -f "${ROOT%/}/lib/modules/${kv}/build") + if [[ -f ${ROOT}/lib/modules/${kv}/source/Makefile ]]; then + KERNEL_DIR=$(readlink -f "${ROOT}/lib/modules/${kv}/source") + if [[ -f ${ROOT}/lib/modules/${kv}/build/Makefile ]]; then + KBUILD_OUTPUT=$(readlink -f "${ROOT}/lib/modules/${kv}/build") fi get_version && return 0 fi @@ -718,7 +708,6 @@ linux-info_get_any_version() { fi } - # ebuild check functions # --------------------------------------- diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass index a6a7b542e64b..4fd4e8679c6a 100644 --- a/eclass/llvm.org.eclass +++ b/eclass/llvm.org.eclass @@ -72,11 +72,11 @@ if [[ -z ${_LLVM_SOURCE_TYPE+1} ]]; then _LLVM_SOURCE_TYPE=snapshot case ${PV} in - 19.0.0_pre20240630) - EGIT_COMMIT=022d15c0039fc1cfaa3cc2eb1a45b71bbb21fadd + 19.0.0_pre20240712) + EGIT_COMMIT=1bad7024561bc64ed4bfda0772b16376b475eba5 ;; - 19.0.0_pre20240623) - EGIT_COMMIT=3ae6755719c6dfc07761b4e9bdac8c86bcb41734 + 19.0.0_pre20240706) + EGIT_COMMIT=0b9f2847da79298ed09c29493245113f02b32d9f ;; *) die "Unknown snapshot: ${PV}" diff --git a/eclass/mount-boot-utils.eclass b/eclass/mount-boot-utils.eclass index 39f8e94b84ec..e24b4e0c0826 100644 --- a/eclass/mount-boot-utils.eclass +++ b/eclass/mount-boot-utils.eclass @@ -4,7 +4,7 @@ # @ECLASS: mount-boot-utils.eclass # @MAINTAINER: # base-system@gentoo.org -# @SUPPORTED_EAPIS: 6 7 8 +# @SUPPORTED_EAPIS: 7 8 # @BLURB: functions for packages that install files into /boot or the ESP # @DESCRIPTION: # This eclass is really only useful for bootloaders and kernel installation. diff --git a/eclass/mount-boot.eclass b/eclass/mount-boot.eclass index ab02b39d6141..ce17026ffd2b 100644 --- a/eclass/mount-boot.eclass +++ b/eclass/mount-boot.eclass @@ -4,7 +4,7 @@ # @ECLASS: mount-boot.eclass # @MAINTAINER: # base-system@gentoo.org -# @SUPPORTED_EAPIS: 6 7 8 +# @SUPPORTED_EAPIS: 7 8 # @BLURB: eclass for packages that install files into /boot or the ESP # @DESCRIPTION: # This eclass is really only useful for bootloaders and kernel installation. diff --git a/eclass/rebar-utils.eclass b/eclass/rebar-utils.eclass new file mode 100644 index 000000000000..5657908eb8e9 --- /dev/null +++ b/eclass/rebar-utils.eclass @@ -0,0 +1,160 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# @ECLASS: rebar-utils.eclass +# @MAINTAINER: +# Florian Schmaus <flow@gentoo.org> +# @AUTHOR: +# Amadeusz Żołnowski <aidecoe@gentoo.org> +# @SUPPORTED_EAPIS: 7 8 +# @BLURB: Auxiliary functions for using dev-util/rebar. +# @DESCRIPTION: +# This eclass provides a set of axiliary functions commonly needed +# when building Erlang/OTP packages with rebar. + +case ${EAPI} in + 7|8) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +if [[ -z ${_REBAR_UTILS_ECLASS} ]]; then +_REBAR_UTILS_ECLASS=1 + +# @ECLASS_VARIABLE: REBAR_APP_SRC +# @DESCRIPTION: +# Relative path to .app.src description file. Defaults to +# 'src/${PN}.app.src'. +: "${REBAR_APP_SRC:=src/${PN}.app.src}" + +# @FUNCTION: get_erl_libs +# @RETURN: the path to Erlang lib directory +# @DESCRIPTION: +# Get the full path without EPREFIX to Erlang lib directory. +get_erl_libs() { + echo "/usr/$(get_libdir)/erlang/lib" +} + +# @FUNCTION: _rebar_find_dep +# @INTERNAL +# @USAGE: <project_name> +# @RETURN: 0 success, 1 dependency not found, 2 multiple versions found +# @DESCRIPTION: +# Find a Erlang package/project by name in Erlang lib directory. Project +# directory is usually suffixed with version. It is matched to '<project_name>' +# or '<project_name>-*'. +_rebar_find_dep() { + local pn="${1}" + local p + local result + + pushd "${EPREFIX}$(get_erl_libs)" >/dev/null || return 1 + for p in ${pn} ${pn}-*; do + if [[ -d ${p} ]]; then + # Ensure there's at most one matching. + [[ ${result} ]] && return 2 + result="${p}" + fi + done + popd >/dev/null || die + + [[ ${result} ]] || return 1 + echo "${result}" +} + +# @FUNCTION: rebar_disable_coverage +# @USAGE: [<rebar_config>] +# @DESCRIPTION: +# Disable coverage in rebar.config. This is a workaround for failing coverage. +# Coverage is not relevant in this context, so there's no harm to disable it, +# although the issue should be fixed. +rebar_disable_coverage() { + debug-print-function ${FUNCNAME} "${@}" + + local rebar_config="${1:-rebar.config}" + + sed -e 's/{cover_enabled, true}/{cover_enabled, false}/' \ + -i "${rebar_config}" \ + || die "failed to disable coverage in ${rebar_config}" +} + +# @FUNCTION: rebar_fix_include_path +# @USAGE: <project_name> [<rebar_config>] +# @DESCRIPTION: +# Fix path in rebar.config to 'include' directory of dependent project/package, +# so it points to installation in system Erlang lib rather than relative 'deps' +# directory. +# +# <rebar_config> is optional. Default is 'rebar.config'. +# +# The function dies on failure. +rebar_fix_include_path() { + debug-print-function ${FUNCNAME} "${@}" + + local pn="${1}" + local rebar_config="${2:-rebar.config}" + local erl_libs="${EPREFIX}$(get_erl_libs)" + local p + + p="$(_rebar_find_dep "${pn}")" \ + || die "failed to unambiguously resolve dependency of '${pn}'" + + gawk -i inplace \ + -v erl_libs="${erl_libs}" -v pn="${pn}" -v p="${p}" ' +/^{[[:space:]]*erl_opts[[:space:]]*,/, /}[[:space:]]*\.$/ { + pattern = "\"(./)?deps/" pn "/include\""; + if (match($0, "{i,[[:space:]]*" pattern "[[:space:]]*}")) { + sub(pattern, "\"" erl_libs "/" p "/include\""); + } + print $0; + next; +} +1 +' "${rebar_config}" || die "failed to fix include paths in ${rebar_config} for '${pn}'" +} + +# @FUNCTION: rebar_remove_deps +# @USAGE: [<rebar_config>] +# @DESCRIPTION: +# Remove dependencies list from rebar.config and deceive build rules that any +# dependencies are already fetched and built. Otherwise rebar tries to fetch +# dependencies and compile them. +# +# <rebar_config> is optional. Default is 'rebar.config'. +# +# The function dies on failure. +rebar_remove_deps() { + debug-print-function ${FUNCNAME} "${@}" + + local rebar_config="${1:-rebar.config}" + + mkdir -p "${S}/deps" && :>"${S}/deps/.got" && :>"${S}/deps/.built" || die + gawk -i inplace ' +/^{[[:space:]]*deps[[:space:]]*,/, /}[[:space:]]*\.$/ { + if ($0 ~ /}[[:space:]]*\.$/) { + print "{deps, []}."; + } + next; +} +1 +' "${rebar_config}" || die "failed to remove deps from ${rebar_config}" +} + +# @FUNCTION: rebar_set_vsn +# @USAGE: [<version>] +# @DESCRIPTION: +# Set version in project description file if it's not set. +# +# <version> is optional. Default is PV stripped from version suffix. +# +# The function dies on failure. +rebar_set_vsn() { + debug-print-function ${FUNCNAME} "${@}" + + local version="${1:-${PV%_*}}" + + sed -e "s/vsn, git/vsn, \"${version}\"/" \ + -i "${S}/${REBAR_APP_SRC}" \ + || die "failed to set version in src/${PN}.app.src" +} + +fi diff --git a/eclass/rebar.eclass b/eclass/rebar.eclass index 97638c761814..1e4e845a9adb 100644 --- a/eclass/rebar.eclass +++ b/eclass/rebar.eclass @@ -7,6 +7,7 @@ # @AUTHOR: # Amadeusz Żołnowski <aidecoe@gentoo.org> # @SUPPORTED_EAPIS: 7 8 +# @PROVIDES: rebar-utils # @BLURB: Build Erlang/OTP projects using dev-util/rebar. # @DESCRIPTION: # An eclass providing functions to build Erlang/OTP projects using @@ -27,6 +28,8 @@ esac if [[ -z ${_REBAR_ECLASS} ]]; then _REBAR_ECLASS=1 +inherit rebar-utils + RDEPEND="dev-lang/erlang:=" DEPEND="${RDEPEND}" BDEPEND=" @@ -34,19 +37,6 @@ BDEPEND=" >=sys-apps/gawk-4.1 " -# @ECLASS_VARIABLE: REBAR_APP_SRC -# @DESCRIPTION: -# Relative path to .app.src description file. -REBAR_APP_SRC="${REBAR_APP_SRC-src/${PN}.app.src}" - -# @FUNCTION: get_erl_libs -# @RETURN: the path to Erlang lib directory -# @DESCRIPTION: -# Get the full path without EPREFIX to Erlang lib directory. -get_erl_libs() { - echo "/usr/$(get_libdir)/erlang/lib" -} - # @FUNCTION: _rebar_find_dep # @INTERNAL # @USAGE: <project_name> @@ -74,22 +64,6 @@ _rebar_find_dep() { echo "${result}" } -# @FUNCTION: rebar_disable_coverage -# @USAGE: [<rebar_config>] -# @DESCRIPTION: -# Disable coverage in rebar.config. This is a workaround for failing coverage. -# Coverage is not relevant in this context, so there's no harm to disable it, -# although the issue should be fixed. -rebar_disable_coverage() { - debug-print-function ${FUNCNAME} "${@}" - - local rebar_config="${1:-rebar.config}" - - sed -e 's/{cover_enabled, true}/{cover_enabled, false}/' \ - -i "${rebar_config}" \ - || die "failed to disable coverage in ${rebar_config}" -} - # @FUNCTION: erebar # @USAGE: <targets> # @DESCRIPTION: @@ -105,86 +79,6 @@ erebar() { rebar -v skip_deps=true "$@" || die -n "rebar $@ failed" } -# @FUNCTION: rebar_fix_include_path -# @USAGE: <project_name> [<rebar_config>] -# @DESCRIPTION: -# Fix path in rebar.config to 'include' directory of dependent project/package, -# so it points to installation in system Erlang lib rather than relative 'deps' -# directory. -# -# <rebar_config> is optional. Default is 'rebar.config'. -# -# The function dies on failure. -rebar_fix_include_path() { - debug-print-function ${FUNCNAME} "${@}" - - local pn="${1}" - local rebar_config="${2:-rebar.config}" - local erl_libs="${EPREFIX}$(get_erl_libs)" - local p - - p="$(_rebar_find_dep "${pn}")" \ - || die "failed to unambiguously resolve dependency of '${pn}'" - - gawk -i inplace \ - -v erl_libs="${erl_libs}" -v pn="${pn}" -v p="${p}" ' -/^{[[:space:]]*erl_opts[[:space:]]*,/, /}[[:space:]]*\.$/ { - pattern = "\"(./)?deps/" pn "/include\""; - if (match($0, "{i,[[:space:]]*" pattern "[[:space:]]*}")) { - sub(pattern, "\"" erl_libs "/" p "/include\""); - } - print $0; - next; -} -1 -' "${rebar_config}" || die "failed to fix include paths in ${rebar_config} for '${pn}'" -} - -# @FUNCTION: rebar_remove_deps -# @USAGE: [<rebar_config>] -# @DESCRIPTION: -# Remove dependencies list from rebar.config and deceive build rules that any -# dependencies are already fetched and built. Otherwise rebar tries to fetch -# dependencies and compile them. -# -# <rebar_config> is optional. Default is 'rebar.config'. -# -# The function dies on failure. -rebar_remove_deps() { - debug-print-function ${FUNCNAME} "${@}" - - local rebar_config="${1:-rebar.config}" - - mkdir -p "${S}/deps" && :>"${S}/deps/.got" && :>"${S}/deps/.built" || die - gawk -i inplace ' -/^{[[:space:]]*deps[[:space:]]*,/, /}[[:space:]]*\.$/ { - if ($0 ~ /}[[:space:]]*\.$/) { - print "{deps, []}."; - } - next; -} -1 -' "${rebar_config}" || die "failed to remove deps from ${rebar_config}" -} - -# @FUNCTION: rebar_set_vsn -# @USAGE: [<version>] -# @DESCRIPTION: -# Set version in project description file if it's not set. -# -# <version> is optional. Default is PV stripped from version suffix. -# -# The function dies on failure. -rebar_set_vsn() { - debug-print-function ${FUNCNAME} "${@}" - - local version="${1:-${PV%_*}}" - - sed -e "s/vsn, git/vsn, \"${version}\"/" \ - -i "${S}/${REBAR_APP_SRC}" \ - || die "failed to set version in src/${PN}.app.src" -} - # @FUNCTION: rebar_src_prepare # @DESCRIPTION: # Prevent rebar from fetching and compiling dependencies. Set version in diff --git a/eclass/rebar3.eclass b/eclass/rebar3.eclass new file mode 100644 index 000000000000..f6383b9c8cdd --- /dev/null +++ b/eclass/rebar3.eclass @@ -0,0 +1,194 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# @ECLASS: rebar3.eclass +# @MAINTAINER: +# Florian Schmaus <flow@gentoo.org> +# @AUTHOR: +# Amadeusz Żołnowski <aidecoe@gentoo.org> +# Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in> +# @SUPPORTED_EAPIS: 8 +# @PROVIDES: rebar-utils +# @BLURB: Build Erlang/OTP projects using dev-util/rebar:3. +# @DESCRIPTION: +# An eclass providing functions to build Erlang/OTP projects using +# dev-util/rebar:3. +# +# rebar is a tool which tries to resolve dependencies itself which is by +# cloning remote git repositories. Dependent projects are usually expected to +# be in sub-directory 'deps' rather than looking at system Erlang lib +# directory. Projects relying on rebar usually don't have 'install' make +# targets. The eclass workarounds some of these problems. It handles +# installation in a generic way for Erlang/OTP structured projects. + +case ${EAPI} in + 8) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +if [[ -z ${_REBAR3_ECLASS} ]]; then +_REBAR3_ECLASS=1 + +inherit edo rebar-utils + +RDEPEND="dev-lang/erlang:=" +DEPEND="${RDEPEND}" +BDEPEND=" + dev-util/rebar:3 + >=sys-apps/gawk-4.1 +" + +# @ECLASS_VARIABLE: REBAR_PROFILE +# @DESCRIPTION: +# Rebar profile to use. Defaults to +# 'default'. +: "${REBAR_PROFILE:=default}" + +# @FUNCTION: _rebar_find_dep +# @INTERNAL +# @USAGE: <project_name> +# @RETURN: 0 success, 1 dependency not found, 2 multiple versions found +# @DESCRIPTION: +# Find a Erlang package/project by name in Erlang lib directory. Project +# directory is usually suffixed with version. It is matched to '<project_name>' +# or '<project_name>-*'. +_rebar_find_dep() { + local pn="${1}" + local p + local result + + pushd "${EPREFIX}$(get_erl_libs)" >/dev/null || return 1 + for p in ${pn} ${pn}-*; do + if [[ -d ${p} ]]; then + # Ensure there's at most one matching. + [[ ${result} ]] && return 2 + result="${p}" + fi + done + popd >/dev/null || die + + [[ ${result} ]] || return 1 + echo "${result}" +} + +# @FUNCTION: erebar3 +# @USAGE: <targets> +# @DESCRIPTION: +# Run rebar with verbose flag. Die on failure. +erebar3() { + debug-print-function ${FUNCNAME} "${@}" + + (( $# > 0 )) || die "${FUNCNAME}: at least one target is required" + + case ${1} in + eunit|ct) + local -x ERL_LIBS="." ;; + *) + local -x ERL_LIBS="${EPREFIX}$(get_erl_libs)" ;; + esac + + local -x HEX_OFFLINE=true + edo rebar3 "$@" +} + +# @FUNCTION: rebar3_src_prepare +# @DESCRIPTION: +# Prevent rebar3 from fetching and compiling dependencies. Set version in +# project description file if it's not set. +# +# Existence of rebar.config is optional, but file description file must exist +# at 'src/${PN}.app.src'. +rebar3_src_prepare() { + debug-print-function ${FUNCNAME} "${@}" + + default + rebar_set_vsn + + if [[ -f rebar.lock ]]; then + rm rebar.lock || die + fi + + if [[ -f rebar.config ]]; then + rebar_disable_coverage + rebar_remove_deps + fi +} + +# @FUNCTION: rebar3_src_configure +# @DESCRIPTION: +# Configure with ERL_LIBS set. +rebar3_src_configure() { + debug-print-function ${FUNCNAME} "${@}" + + local -x ERL_LIBS="${EPREFIX}$(get_erl_libs)" + default +} + +# @FUNCTION: rebar3_src_compile +# @DESCRIPTION: +# Compile project with rebar3. +rebar3_src_compile() { + debug-print-function ${FUNCNAME} "${@}" + + erebar3 as "${REBAR_PROFILE}" release --all +} + +# @FUNCTION: rebar3_src_test +# @DESCRIPTION: +# Run unit tests. +rebar3_src_test() { + debug-print-function ${FUNCNAME} "${@}" + + erebar3 eunit -v +} + +# @FUNCTION: rebar3_install_lib +# @USAGE: <dir> +# @DESCRIPTION: +# Install BEAM files, include headers and native libraries. +# +# Function expects that project conforms to Erlang/OTP structure. +rebar3_install_lib() { + debug-print-function ${FUNCNAME} "${@}" + + local dest="$(get_erl_libs)/${P}" + insinto "${dest}" + + pushd "${1?}" >/dev/null || die + for dir in ebin include priv; do + if [[ -d ${dir} && ! -L ${dir} ]]; then + doins -r "${dir}" + fi + done + popd >/dev/null || die +} + +# @FUNCTION: rebar3_src_install +# @DESCRIPTION: +# Install built release or library. +# +# Function expects that project conforms to Erlang/OTP structure. +rebar3_src_install() { + debug-print-function ${FUNCNAME} "${@}" + + pushd "_build/${REBAR_PROFILE}" >/dev/null || die + if [[ -d rel/${PN} ]]; then + if ! declare -f rebar3_install_release >/dev/null; then + die "${FUNCNAME}: a custom function named 'rebar3_install_release' is required to install a release" + fi + pushd rel/${PN} >/dev/null || die + rebar3_install_release || die + popd >/dev/null || die + elif [[ -d lib/${PN} ]]; then + rebar3_install_lib lib/${PN} + else + die "No releases or libraries to install" + fi + popd >/dev/null || die + + einstalldocs +} + +fi + +EXPORT_FUNCTIONS src_prepare src_compile src_test src_install diff --git a/eclass/tree-sitter-grammar.eclass b/eclass/tree-sitter-grammar.eclass index 24473fb98b1f..10f29b8a0835 100644 --- a/eclass/tree-sitter-grammar.eclass +++ b/eclass/tree-sitter-grammar.eclass @@ -47,7 +47,7 @@ for _BINDING in "${TS_BINDINGS[@]}"; do DISTUTILS_EXT=1 DISTUTILS_OPTIONAL=1 DISTUTILS_USE_PEP517=setuptools - PYTHON_COMPAT=( python3_{10..12} ) + PYTHON_COMPAT=( python3_{10..13} ) inherit distutils-r1 IUSE+=" python" @@ -162,6 +162,8 @@ tree-sitter-grammar_src_compile() { if [[ -f "${S}/pyproject.toml" ]]; then sed -e "/SONAME_MINOR :=/s/:=.*$/:= $(_get_tsg_abi_ver)/" -i "${S}/Makefile" || die emake \ + CC="$(tc-getCC)" \ + AR="$(tc-getAR)" \ STRIP="" \ PREFIX="${EPREFIX}/usr" \ LIBDIR="${EPREFIX}/usr/$(get_libdir)" diff --git a/eclass/vcs-snapshot.eclass b/eclass/vcs-snapshot.eclass index 1b7299b92a3b..0279e89ec3ab 100644 --- a/eclass/vcs-snapshot.eclass +++ b/eclass/vcs-snapshot.eclass @@ -1,10 +1,10 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: vcs-snapshot.eclass # @MAINTAINER: # mgorny@gentoo.org -# @SUPPORTED_EAPIS: 6 7 8 +# @SUPPORTED_EAPIS: 7 8 # @BLURB: support eclass for unpacking VCS snapshot tarballs # @DESCRIPTION: # THIS ECLASS IS NOT NECESSARY FOR MODERN GITHUB AND GITLAB SNAPSHOTS. @@ -43,7 +43,6 @@ # in ${WORKDIR}/${P} and ${WORKDIR}/${P}-otherstuff respectively. case ${EAPI} in - 6) inherit eqawarn ;; 7|8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac @@ -103,13 +102,10 @@ vcs-snapshot_src_unpack() { done if [[ ! ${renamed_any} ]]; then - local w=eerror - [[ ${EAPI} == 6 ]] && w=eqawarn - "${w}" "${FUNCNAME} did not find any archives that needed renaming." - "${w}" "Please verify that its usage is really necessary, and remove" - "${w}" "the inherit if it is not." - - [[ ${w} == eerror ]] && die "${FUNCNAME}: Unnecessary usage detected" + eerror "${FUNCNAME} did not find any archives that needed renaming." + eerror "Please verify that its usage is really necessary, and remove" + eerror "the inherit if it is not." + die "${FUNCNAME}: Unnecessary usage detected" fi } |