mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-30 01:51:09 +02:00
eclass/sgml-catalog-r1: Sync with Gentoo
It's from Gentoo commit 65a031f4c9d702c4fc8b6ce6b0541453a6db8c08.
This commit is contained in:
parent
1fe3c81c7b
commit
0267b0bfae
@ -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
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
# @ECLASS: sgml-catalog-r1.eclass
|
# @ECLASS: sgml-catalog-r1.eclass
|
||||||
@ -12,14 +12,13 @@
|
|||||||
# This eclass regenerates /etc/sgml/catalog as necessary for the DocBook
|
# This eclass regenerates /etc/sgml/catalog as necessary for the DocBook
|
||||||
# tooling. This is done via exported pkg_postinst and pkg_postrm phases.
|
# tooling. This is done via exported pkg_postinst and pkg_postrm phases.
|
||||||
|
|
||||||
case ${EAPI:-0} in
|
case ${EAPI} in
|
||||||
7) ;;
|
7) ;;
|
||||||
*) die "Unsupported EAPI=${EAPI} for ${ECLASS}";;
|
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
EXPORT_FUNCTIONS pkg_postinst pkg_postrm
|
if [[ -z ${_SGML_CATALOG_R1_ECLASS} ]]; then
|
||||||
|
_SGML_CATALOG_R1_ECLASS=1
|
||||||
if [[ ! ${_SGML_CATALOG_R1} ]]; then
|
|
||||||
|
|
||||||
if [[ ${CATEGORY}/${PN} != app-text/sgml-common ]]; then
|
if [[ ${CATEGORY}/${PN} != app-text/sgml-common ]]; then
|
||||||
RDEPEND=">=app-text/sgml-common-0.6.3-r7"
|
RDEPEND=">=app-text/sgml-common-0.6.3-r7"
|
||||||
@ -36,7 +35,7 @@ sgml-catalog-r1_update_catalog() {
|
|||||||
|
|
||||||
if [[ ${#cats[@]} -gt 0 ]]; then
|
if [[ ${#cats[@]} -gt 0 ]]; then
|
||||||
ebegin "Updating ${EROOT}/etc/sgml/catalog"
|
ebegin "Updating ${EROOT}/etc/sgml/catalog"
|
||||||
printf 'CATALOG "%s"\n' "${cats[@]}" > "${T}"/catalog &&
|
printf 'CATALOG "%s"\n' "${cats[@]#${ROOT}}" > "${T}"/catalog &&
|
||||||
mv "${T}"/catalog "${EROOT}"/etc/sgml/catalog
|
mv "${T}"/catalog "${EROOT}"/etc/sgml/catalog
|
||||||
eend "${?}"
|
eend "${?}"
|
||||||
else
|
else
|
||||||
@ -64,5 +63,6 @@ sgml-catalog-r1_pkg_postrm() {
|
|||||||
sgml-catalog-r1_update_env
|
sgml-catalog-r1_update_env
|
||||||
}
|
}
|
||||||
|
|
||||||
_SGML_CATALOG_R1=1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
EXPORT_FUNCTIONS pkg_postinst pkg_postrm
|
||||||
|
Loading…
x
Reference in New Issue
Block a user