eclass/wrapper: Sync with Gentoo

It's from Gentoo commit 93c765a9b349be736f86cb6ca823d8cf6220a335.
This commit is contained in:
Flatcar Buildbot 2024-09-16 07:14:35 +00:00 committed by Krzesimir Nowak
parent 5f5b04a214
commit 121b76c84e

View File

@ -1,4 +1,4 @@
# Copyright 1999-2022 Gentoo Authors # Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
# @ECLASS: wrapper.eclass # @ECLASS: wrapper.eclass
@ -7,15 +7,19 @@
# @SUPPORTED_EAPIS: 5 6 7 8 # @SUPPORTED_EAPIS: 5 6 7 8
# @BLURB: create a shell wrapper script # @BLURB: create a shell wrapper script
case ${EAPI} in
5|6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
if [[ -z ${_WRAPPER_ECLASS} ]]; then if [[ -z ${_WRAPPER_ECLASS} ]]; then
_WRAPPER_ECLASS=1 _WRAPPER_ECLASS=1
# @FUNCTION: make_wrapper case ${EAPI} in
5|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
# FUNCTION: make_wrapper
# @USAGE: <wrapper> <target> [chdir] [libpaths] [installpath] # @USAGE: <wrapper> <target> [chdir] [libpaths] [installpath]
# @DESCRIPTION: # @DESCRIPTION:
# Create a shell wrapper script named wrapper in installpath # Create a shell wrapper script named wrapper in installpath