eclass/preserve-libs: Sync with Gentoo

It's from Gentoo commit e2bb16305d903272dcef1e902d0e7b3ec87dd87b.
This commit is contained in:
Flatcar Buildbot 2024-09-16 07:14:05 +00:00 committed by Krzesimir Nowak
parent b4a69bd53d
commit f2bec42364

View File

@ -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: preserve-libs.eclass
@ -7,14 +7,18 @@
# @SUPPORTED_EAPIS: 5 6 7 8
# @BLURB: preserve libraries after SONAME changes
case ${EAPI} in
5|6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
if [[ -z ${_PRESERVE_LIBS_ECLASS} ]]; then
_PRESERVE_LIBS_ECLASS=1
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: preserve_old_lib
# @USAGE: <libs to preserve> [more libs]
# @DESCRIPTION: