diff options
-rw-r--r-- | eclass/systemd.eclass | 66 |
1 files changed, 7 insertions, 59 deletions
diff --git a/eclass/systemd.eclass b/eclass/systemd.eclass index a5f0decde1e3..95fe64f4414f 100644 --- a/eclass/systemd.eclass +++ b/eclass/systemd.eclass @@ -4,7 +4,7 @@ # @ECLASS: systemd.eclass # @MAINTAINER: # systemd@gentoo.org -# @SUPPORTED_EAPIS: 5 6 7 8 +# @SUPPORTED_EAPIS: 7 8 # @BLURB: helper functions to install systemd units # @DESCRIPTION: # This eclass provides a set of functions to install unit files for @@ -24,22 +24,17 @@ # } # @CODE +if [[ -z ${_SYSTEMD_ECLASS} ]]; then +_SYSTEMD_ECLASS=1 + case ${EAPI} in - 6) - ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!" - ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI." - ;; 7|8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac inherit toolchain-funcs -if [[ ${EAPI} == [56] ]]; then - DEPEND="virtual/pkgconfig" -else - BDEPEND="virtual/pkgconfig" -fi +BDEPEND="virtual/pkgconfig" # @FUNCTION: _systemd_get_dir # @USAGE: <variable-name> <fallback-directory> @@ -85,15 +80,6 @@ systemd_get_systemunitdir() { _systemd_get_dir systemdsystemunitdir /lib/systemd/system } -# @FUNCTION: systemd_get_unitdir -# @DESCRIPTION: -# Deprecated alias for systemd_get_systemunitdir. -systemd_get_unitdir() { - [[ ${EAPI} == 5 ]] || die "${FUNCNAME} is banned in EAPI 6, use systemd_get_systemunitdir instead" - - systemd_get_systemunitdir -} - # @FUNCTION: systemd_get_userunitdir # @DESCRIPTION: # Output the path for the systemd user unit directory (not including @@ -339,46 +325,6 @@ systemd_enable_ntpunit() { return ${ret} } -# @FUNCTION: systemd_with_unitdir -# @USAGE: [<configure-option-name>] -# @DESCRIPTION: -# Note: deprecated and banned in EAPI 6. Please use full --with-...= -# parameter for improved ebuild readability. -# -# Output '--with-systemdsystemunitdir' as expected by systemd-aware configure -# scripts. This function always succeeds. Its output may be quoted in order -# to preserve whitespace in paths. systemd_to_myeconfargs() is preferred over -# this function. -# -# If upstream does use invalid configure option to handle installing systemd -# units (e.g. `--with-systemdunitdir'), you can pass the 'suffix' as an optional -# argument to this function (`$(systemd_with_unitdir systemdunitdir)'). Please -# remember to report a bug upstream as well. -systemd_with_unitdir() { - [[ ${EAPI} == 5 ]] || die "${FUNCNAME} is banned in EAPI ${EAPI}, use --with-${1:-systemdsystemunitdir}=\"\$(systemd_get_systemunitdir)\" instead" - - debug-print-function ${FUNCNAME} "${@}" - local optname=${1:-systemdsystemunitdir} - - echo --with-${optname}="$(systemd_get_systemunitdir)" -} - -# @FUNCTION: systemd_with_utildir -# @DESCRIPTION: -# Note: deprecated and banned in EAPI 6. Please use full --with-...= -# parameter for improved ebuild readability. -# -# Output '--with-systemdsystemutildir' as used by some packages to install -# systemd helpers. This function always succeeds. Its output may be quoted -# in order to preserve whitespace in paths. -systemd_with_utildir() { - [[ ${EAPI} == 5 ]] || die "${FUNCNAME} is banned in EAPI ${EAPI}, use --with-systemdutildir=\"\$(systemd_get_utildir)\" instead" - - debug-print-function ${FUNCNAME} "${@}" - - echo --with-systemdutildir="$(systemd_get_utildir)" -} - # @FUNCTION: systemd_update_catalog # @DESCRIPTION: # Update the journald catalog. This needs to be called after installing @@ -448,3 +394,5 @@ systemd_reenable() { fi done } + +fi |