forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
systemd.eclass: drop support for EAPI 5 and 6
Signed-off-by: David Seifert <[email protected]>
- Loading branch information
1 parent
d5184aa
commit 8d9c839
Showing
1 changed file
with
7 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
# @ECLASS: systemd.eclass | ||
# @MAINTAINER: | ||
# [email protected] | ||
# @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 |