commit:     d8969f60bdeb5d668dba13d7706b0bb9f901e120
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 27 16:30:03 2022 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Tue Dec 27 16:30:03 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8969f60

postgres.eclass: drop EAPI 5, 6 support

Signed-off-by: David Seifert <soap <AT> gentoo.org>

 eclass/postgres.eclass | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/eclass/postgres.eclass b/eclass/postgres.eclass
index 8e204e2ade8c..e94ab56a40ae 100644
--- a/eclass/postgres.eclass
+++ b/eclass/postgres.eclass
@@ -1,14 +1,12 @@
 # Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EXPORT_FUNCTIONS pkg_setup
-
 # @ECLASS: postgres.eclass
 # @MAINTAINER:
 # PostgreSQL <[email protected]>
 # @AUTHOR:
 # Aaron W. Swenson <[email protected]>
-# @SUPPORTED_EAPIS: 5 6 7
+# @SUPPORTED_EAPIS: 7
 # @BLURB: An eclass for PostgreSQL-related packages
 # @DESCRIPTION:
 # This eclass provides common utility functions that many
@@ -16,12 +14,14 @@ EXPORT_FUNCTIONS pkg_setup
 # currently selected PostgreSQL slot is within a range, adding a system
 # user to the postgres system group, and generating dependencies.
 
-
-case ${EAPI:-0} in
-       5|6|7) ;;
-       *) die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" ;;
+case ${EAPI} in
+       7) ;;
+       *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
+if [[ ! ${_POSTGRES_ECLASS} ]]; then
+_POSTGRES_ECLASS=1
+
 # @ECLASS_VARIABLE: _POSTGRES_ALL_VERSIONS
 # @INTERNAL
 # @DESCRIPTION:
@@ -159,3 +159,7 @@ postgres_pkg_setup() {
 
        elog "PostgreSQL Target: ${best_slot}"
 }
+
+fi
+
+EXPORT_FUNCTIONS pkg_setup

Reply via email to