Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[gentoo-dev] [PATCH 0/7] Don't indent eclass documentation

4 views
Skip to first unread message

Ulrich Müller

unread,
May 10, 2022, 2:00:02 AM5/10/22
to
Eclass documentation line must start exactly with the string "# @"
in column 0, otherwise they won't be recognized by our tools (e.g.
eclass-to-manpage.awk). Update eclasses to follow that convention.

Ulrich Müller (7):
check-reqs.eclass: Don't indent eclass documentation
kde.org.eclass: Don't indent eclass documentation
mercurial.eclass: Don't indent eclass documentation
ruby-fakegem.eclass: Don't indent eclass documentation
waf-utils.eclass: Don't indent eclass documentation
xorg-3.eclass: Don't indent eclass documentation
cmake-utils.eclass: Drop @SEE which is not a documentation keyword

eclass/check-reqs.eclass | 13 +++++++------
eclass/cmake-utils.eclass | 1 -
eclass/kde.org.eclass | 20 +++++++++++---------
eclass/mercurial.eclass | 8 ++++----
eclass/ruby-fakegem.eclass | 6 +++---
eclass/waf-utils.eclass | 10 ++++++----
eclass/xorg-3.eclass | 24 +++++++++++++-----------
7 files changed, 44 insertions(+), 38 deletions(-)

--
2.35.1

Ulrich Müller

unread,
May 10, 2022, 2:10:03 AM5/10/22
to
Signed-off-by: Ulrich Müller <u...@gentoo.org>
---
eclass/check-reqs.eclass | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/eclass/check-reqs.eclass b/eclass/check-reqs.eclass
index 5a754c54a303..ddf0a47775ae 100644
--- a/eclass/check-reqs.eclass
+++ b/eclass/check-reqs.eclass
@@ -1,4 +1,4 @@
-# Copyright 2004-2021 Gentoo Authors
+# Copyright 2004-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

# @ECLASS: check-reqs.eclass
@@ -76,6 +76,12 @@ _CHECK_REQS_ECLASS=1
# This is a user flag and should under _no circumstances_ be set in the ebuild.
[[ -n ${I_KNOW_WHAT_I_AM_DOING} ]] && CHECKREQS_DONOTHING=1

+# @ECLASS_VARIABLE: CHECKREQS_FAILED
+# @INTERNAL
+# @DESCRIPTION:
+# If set the checks failed and eclass should abort the build.
+# Internal, do not set yourself.
+
# @FUNCTION: check-reqs_pkg_setup
# @DESCRIPTION:
# Exported function running the resources checks in pkg_setup phase.
@@ -457,11 +463,6 @@ _check-reqs_unsatisfied() {
[[ ${EBUILD_PHASE} == "pretend" && -z ${CHECKREQS_DONOTHING} ]] && msg="eerror"
${msg} "There is NOT at least ${sizeunit} ${location}"

- # @ECLASS_VARIABLE: CHECKREQS_FAILED
- # @INTERNAL
- # @DESCRIPTION:
- # If set the checks failed and eclass should abort the build.
- # Internal, do not set yourself.
CHECKREQS_FAILED="true"
}

--
2.35.1

Ulrich Müller

unread,
May 10, 2022, 2:10:03 AM5/10/22
to
Signed-off-by: Ulrich Müller <u...@gentoo.org>
---
eclass/kde.org.eclass | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/eclass/kde.org.eclass b/eclass/kde.org.eclass
index 8e0c97f0ec00..b38ca5a024ab 100644
--- a/eclass/kde.org.eclass
+++ b/eclass/kde.org.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

# @ECLASS: kde.org.eclass
@@ -137,6 +137,16 @@ esac
# a proper error message via pkg_nofetch.
KDE_UNRELEASED=( )

+# @ECLASS_VARIABLE: EGIT_MIRROR
+# @DESCRIPTION:
+# This variable allows easy overriding of default kde mirror service
+# (anongit) with anything else you might want to use.
+
+# @ECLASS_VARIABLE: EGIT_REPONAME
+# @DESCRIPTION:
+# This variable allows overriding of default repository name.
+# Specify only if this differs from PN and KDE_ORG_NAME.
+
HOMEPAGE="https://kde.org/"

case ${CATEGORY} in
@@ -249,10 +259,6 @@ _kde.org_calculate_live_repo() {

SRC_URI=""

- # @ECLASS_VARIABLE: EGIT_MIRROR
- # @DESCRIPTION:
- # This variable allows easy overriding of default kde mirror service
- # (anongit) with anything else you might want to use.
EGIT_MIRROR=${EGIT_MIRROR:=https://invent.kde.org/${KDE_ORG_CATEGORY}}

if [[ ${PV} == 5.??(.?)*.9999 && ${CATEGORY} == dev-qt ]]; then
@@ -267,10 +273,6 @@ _kde.org_calculate_live_repo() {
EGIT_BRANCH="Plasma/$(ver_cut 1-2)"
fi

- # @ECLASS_VARIABLE: EGIT_REPONAME
- # @DESCRIPTION:
- # This variable allows overriding of default repository
- # name. Specify only if this differs from PN and KDE_ORG_NAME.
EGIT_REPO_URI="${EGIT_MIRROR}/${EGIT_REPONAME:=$KDE_ORG_NAME}.git"
}

--
2.35.1

Ulrich Müller

unread,
May 10, 2022, 2:10:03 AM5/10/22
to
Signed-off-by: Ulrich Müller <u...@gentoo.org>
---
eclass/cmake-utils.eclass | 1 -
1 file changed, 1 deletion(-)

diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
index 4ec3b900edaf..11bb2e259e58 100644
--- a/eclass/cmake-utils.eclass
+++ b/eclass/cmake-utils.eclass
@@ -554,7 +554,6 @@ cmake-utils_src_configure() {
# Fix xdg collision with sandbox
xdg_environment_reset

- # @SEE CMAKE_BUILD_TYPE
if [[ ${CMAKE_BUILD_TYPE} = Gentoo ]]; then
# Handle release builds
if ! has debug ${IUSE//+} || ! use debug; then
--
2.35.1

Ulrich Müller

unread,
May 10, 2022, 2:10:03 AM5/10/22
to
Signed-off-by: Ulrich Müller <u...@gentoo.org>
---
eclass/ruby-fakegem.eclass | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/eclass/ruby-fakegem.eclass b/eclass/ruby-fakegem.eclass
index 41dbb1e16340..358fff1be753 100644
--- a/eclass/ruby-fakegem.eclass
+++ b/eclass/ruby-fakegem.eclass
@@ -564,10 +564,10 @@ each_fakegem_test() {
esac
}

+# @FUNCTION: each_ruby_test
+# @DESCRIPTION:
+# Run the tests for this package.
if [[ ${RUBY_FAKEGEM_RECIPE_TEST} != none ]]; then
- # @FUNCTION: each_ruby_test
- # @DESCRIPTION:
- # Run the tests for this package.
each_ruby_test() {
each_fakegem_test
}
--
2.35.1

Ulrich Müller

unread,
May 10, 2022, 2:10:03 AM5/10/22
to
Signed-off-by: Ulrich Müller <u...@gentoo.org>
---
eclass/mercurial.eclass | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/eclass/mercurial.eclass b/eclass/mercurial.eclass
index 8f0e6edfeb0b..2616b88311cf 100644
--- a/eclass/mercurial.eclass
+++ b/eclass/mercurial.eclass
@@ -94,6 +94,10 @@ BDEPEND="dev-vcs/mercurial"
# users.
EHG_OFFLINE="${EHG_OFFLINE:-${EVCS_OFFLINE}}"

+# @ECLASS_VARIABLE: EHG_BOOTSTRAP
+# @DESCRIPTION:
+# Command to be executed after checkout and clone of the specified repository.
+
# @FUNCTION: mercurial_fetch
# @USAGE: [repository_uri] [module] [sourcedir]
# @DESCRIPTION:
@@ -171,10 +175,6 @@ mercurial_fetch() {
mercurial_bootstrap() {
debug-print-function ${FUNCNAME} "$@"

- # @ECLASS_VARIABLE: EHG_BOOTSTRAP
- # @DESCRIPTION:
- # Command to be executed after checkout and clone of the specified
- # repository.
if [[ ${EHG_BOOTSTRAP} ]]; then
pushd "${S}" > /dev/null
einfo "Starting bootstrap"
--
2.35.1

Ulrich Müller

unread,
May 10, 2022, 2:10:03 AM5/10/22
to
Signed-off-by: Ulrich Müller <u...@gentoo.org>
---
eclass/xorg-3.eclass | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/eclass/xorg-3.eclass b/eclass/xorg-3.eclass
index c68b3041629a..378a7b8c4103 100644
--- a/eclass/xorg-3.eclass
+++ b/eclass/xorg-3.eclass
@@ -152,6 +152,14 @@ BDEPEND+=" ${EAUTORECONF_DEPENDS}"
unset EAUTORECONF_DEPENDS
unset EAUTORECONF_DEPEND

+# @ECLASS_VARIABLE: FONT_DIR
+# @PRE_INHERIT
+# @DESCRIPTION:
+# If you're creating a font package and the suffix of PN is not equal to
+# the subdirectory of /usr/share/fonts/ it should install into, set
+# FONT_DIR to that directory or directories. Set before inheriting this
+# eclass.
+
if [[ ${FONT} == yes ]]; then
RDEPEND+=" media-fonts/encodings
>=x11-apps/mkfontscale-1.2.0"
@@ -160,13 +168,6 @@ if [[ ${FONT} == yes ]]; then
>=x11-apps/mkfontscale-1.2.0"
BDEPEND+=" x11-apps/bdftopcf"

- # @ECLASS_VARIABLE: FONT_DIR
- # @PRE_INHERIT
- # @DESCRIPTION:
- # If you're creating a font package and the suffix of PN is not equal to
- # the subdirectory of /usr/share/fonts/ it should install into, set
- # FONT_DIR to that directory or directories. Set before inheriting this
- # eclass.
[[ -z ${FONT_DIR} ]] && FONT_DIR=${PN##*-}

# Fix case of font directories
@@ -352,6 +353,11 @@ multilib_src_configure() {
ECONF_SOURCE="${S}" econf "${econfargs[@]}"
}

+# @VARIABLE: XORG_CONFIGURE_OPTIONS
+# @DESCRIPTION:
+# Array of an additional options to pass to configure.
+# @DEFAULT_UNSET
+
# @FUNCTION: xorg-3_src_configure
# @DESCRIPTION:
# Perform any necessary pre-configuration steps, then run configure
@@ -360,10 +366,6 @@ xorg-3_src_configure() {

xorg-3_flags_setup

- # @VARIABLE: XORG_CONFIGURE_OPTIONS
- # @DESCRIPTION:
- # Array of an additional options to pass to configure.
- # @DEFAULT_UNSET
local xorgconfadd=("${XORG_CONFIGURE_OPTIONS[@]}")

local FONT_OPTIONS=()
--
2.35.1

Ulrich Müller

unread,
May 10, 2022, 2:10:03 AM5/10/22
to
Signed-off-by: Ulrich Müller <u...@gentoo.org>
---
eclass/waf-utils.eclass | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/eclass/waf-utils.eclass b/eclass/waf-utils.eclass
index 7945cc869eb6..d5d52b9af247 100644
--- a/eclass/waf-utils.eclass
+++ b/eclass/waf-utils.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

# @ECLASS: waf-utils.eclass
@@ -29,6 +29,11 @@ esac
# this is _not_ meant to be set in ebuilds
: ${WAF_VERBOSE:=ON}

+# @ECLASS_VARIABLE: WAF_BINARY
+# @DESCRIPTION:
+# Eclass can use different waf executable. Usually it is located
+# in "${S}/waf".
+
# @FUNCTION: waf-utils_src_configure
# @DESCRIPTION:
# General function for configuring with waf.
@@ -69,9 +74,6 @@ waf-utils_src_configure() {

[[ ${fail} ]] && die "Invalid use of waf-utils.eclass"

- # @ECLASS_VARIABLE: WAF_BINARY
- # @DESCRIPTION:
- # Eclass can use different waf executable. Usually it is located in "${S}/waf".
: ${WAF_BINARY:="${S}/waf"}

local conf_args=()
--
2.35.1

Ulrich Mueller

unread,
May 10, 2022, 3:30:02 PM5/10/22
to
>>>>> On Tue, 10 May 2022, Ulrich Müller wrote:

> eclass/cmake-utils.eclass | 1 -
> 1 file changed, 1 deletion(-)

I'm going to drop this commit, because cmake-utils is on its way out of
the tree. The rest of the series doesn't change.

Ulrich
0 new messages