summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2023-03-17 23:04:31 +0100
committerDavid Seifert <soap@gentoo.org>2023-03-17 23:04:31 +0100
commit2cba2db27919bc449ed2a7bf7ed3259c6b96e65f (patch)
treec89a0929ca3e7cc95c737085614214e89450c999 /eclass/sgml-catalog-r1.eclass
parentxdg.eclass: remove EAPI 5 (diff)
downloadgentoo-2cba2db27919bc449ed2a7bf7ed3259c6b96e65f.tar.gz
gentoo-2cba2db27919bc449ed2a7bf7ed3259c6b96e65f.tar.bz2
gentoo-2cba2db27919bc449ed2a7bf7ed3259c6b96e65f.zip
eclass: standardize prologue/epilogue
Closes: https://github.com/gentoo/gentoo/pull/30061 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'eclass/sgml-catalog-r1.eclass')
-rw-r--r--eclass/sgml-catalog-r1.eclass14
1 files changed, 7 insertions, 7 deletions
diff --git a/eclass/sgml-catalog-r1.eclass b/eclass/sgml-catalog-r1.eclass
index 9f8bb13d6095..2258b3e2bf0f 100644
--- a/eclass/sgml-catalog-r1.eclass
+++ b/eclass/sgml-catalog-r1.eclass
@@ -1,4 +1,4 @@
-# Copyright 2019-2021 Gentoo Authors
+# Copyright 2019-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: sgml-catalog-r1.eclass
@@ -12,14 +12,13 @@
# This eclass regenerates /etc/sgml/catalog as necessary for the DocBook
# tooling. This is done via exported pkg_postinst and pkg_postrm phases.
-case ${EAPI:-0} in
+case ${EAPI} in
7) ;;
- *) die "Unsupported EAPI=${EAPI} for ${ECLASS}";;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-EXPORT_FUNCTIONS pkg_postinst pkg_postrm
-
-if [[ ! ${_SGML_CATALOG_R1} ]]; then
+if [[ -z ${_SGML_CATALOG_R1_ECLASS} ]]; then
+_SGML_CATALOG_R1_ECLASS=1
if [[ ${CATEGORY}/${PN} != app-text/sgml-common ]]; then
RDEPEND=">=app-text/sgml-common-0.6.3-r7"
@@ -64,5 +63,6 @@ sgml-catalog-r1_pkg_postrm() {
sgml-catalog-r1_update_env
}
-_SGML_CATALOG_R1=1
fi
+
+EXPORT_FUNCTIONS pkg_postinst pkg_postrm