summaryrefslogtreecommitdiffstats
path: root/eclass
diff options
context:
space:
mode:
authorormorph <roma251078@mail.ru>2022-09-14 22:38:46 +0200
committerormorph <roma251078@mail.ru>2022-09-14 22:45:56 +0200
commit802f52c9d328df0a1d9a86b99deedddce868ad84 (patch)
tree2bbd7afeb10103b8b90ad79b8deb56e279e14870 /eclass
parentdf0ae35e2cbed9ff04fadf14ce4b5574440c1607 (diff)
downloadtde-packaging-gentoo-802f52c9d328df0a1d9a86b99deedddce868ad84.tar.gz
tde-packaging-gentoo-802f52c9d328df0a1d9a86b99deedddce868ad84.zip
Fixed obsolete macro definitions, added documentation for classes, functions and variables
Signed-off-by: ormorph <roma251078@mail.ru>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/trinity-base-2.eclass68
-rw-r--r--eclass/trinity-functions-2.eclass27
-rw-r--r--eclass/trinity-meta-2.eclass7
3 files changed, 76 insertions, 26 deletions
diff --git a/eclass/trinity-base-2.eclass b/eclass/trinity-base-2.eclass
index 8dafe84c..3d433989 100644
--- a/eclass/trinity-base-2.eclass
+++ b/eclass/trinity-base-2.eclass
@@ -2,7 +2,12 @@
# Copyright 2020-2022 The Trinity Desktop Project
# Distributed under the terms of the GNU General Public License v2
-#
+# @ECLASS: trinity-base-2.eclass
+# @MAINTAINER:
+# gentoo@trinitydesktop.org
+# @SUPPORTED_EAPIS: 7 8
+# @BLURB: common ebuild functions for trinity-base packages
+# @DESCRIPTION:
# Original Author: fat-zer
# Ported to git-r3 eclass and EAPI7 by E. Liddell
# Ported to cmake eclass and EAPI8 by ormorh
@@ -11,7 +16,7 @@
inherit trinity-functions-2
-# @ECLASS-VARIABLE: TRINITY_BUILD_ADMIN
+# @ECLASS_VARIABLE: TRINITY_BUILD_ADMIN
# @DESCRIPTION:
# The value of this variable determines the package build mode.
# If set to "yes", the module "admin" is used for assembly.The build
@@ -44,7 +49,7 @@ case ${EAPI} in
*) die "Unknown EAPI=${EAPI}"
esac
-# @ECLASS-VARIABLE: BUILD_TYPE
+# @ECLASS_VARIABLE: BUILD_TYPE
# @DESCRIPTION:
# Determines the build type: live or release
if [[ "${PV}" == *"9999"* ]]; then
@@ -54,41 +59,41 @@ else
fi
export BUILD_TYPE
-# @ECLASS-VARIABLE: TRINITY_MODULE_NAME
+# @ECLASS_VARIABLE: TRINITY_MODULE_NAME
# @DESCRIPTION:
# The name of trinity module; It's used for multiple purposes. First of all it
# determines the tarball name (git repository for live packages)
echo "${TRINITY_MODULE_NAME:=${PN}}" >/dev/null
-# @ECLASS-VARIABLE: TRINITY_SCM
+# @ECLASS_VARIABLE: TRINITY_SCM
# @DESCRIPTION:
# Determines which version control system code is checking out live ebuilds from.
-# @ECLASS-VARIABLE: TMP_DOCDIR
+# @ECLASS_VARIABLE: TMP_DOCDIR
# @DESCRIPTION:
# A temporary directory used to copy common documentation before installing it
#
-# @ECLASS-VARIABLE: TRINTY_BASE_NO_INSTALL_DOC
+# @ECLASS_VARIABLE: TRINTY_BASE_NO_INSTALL_DOC
# @DESCRIPTION:
# if set to anything except "no" this variable prevents
# trinity-base_src_install() from installing documentation
#
-# @ECLASS-VARIABLE: TRINTY_LANGS
+# @ECLASS_VARIABLE: TRINTY_LANGS
# @DESCRIPTION:
# This is a whitespace-separated list of translations this ebuild supports.
# These translations are automatically added to IUSE. Therefore ebuilds must set
# this variable before inheriting any eclasses. To enable only selected
# translations, ebuilds must call enable_selected_linguas().
-# @ECLASS-VARIABLE: TRINTY_DOC_LANGS
+# @ECLASS_VARIABLE: TRINTY_DOC_LANGS
# @DESCRIPTION:
# This is a whitespace-separated list of translations this ebuild supports.
# These translations are automatically added to IUSE. Therefore ebuilds must set
# this variable before inheriting any eclasses. To enable only selected
# translations, ebuilds must call enable_selected_linguas().
-# @ECLASS-VARIABLE: TRINITY_HANDBOOK
+# @ECLASS_VARIABLE: TRINITY_HANDBOOK
# @DESCRIPTION:
# Set to enable handbook in application. Possible values are 'always', 'optional'
# (handbook USE flag) and 'never'.
@@ -96,23 +101,23 @@ echo "${TRINITY_MODULE_NAME:=${PN}}" >/dev/null
# Also ensures buildtime and runtime dependencies are met.
TRINITY_HANDBOOK="${TRINITY_HANDBOOK:-never}"
-# @ECLASS-VARIABLE: TRINITY_EXTRAGEAR_PACKAGING
+# @ECLASS_VARIABLE: TRINITY_EXTRAGEAR_PACKAGING
# @DESCRIPTION:
# Set TRINITY_EXTRAGEAR_PACKAGING=yes before inheriting if the package use extragear-like
# packaging and then supports ${TRINITY_LANGS}, ${TRINITY_DOC_LANGS} and
# ${TRINITY_HANDBOOK} variables. The translations are found in the directory
# pointed by the TEG_PO_DIR variable.
-# @ECLASS-VARIABLE: TRINITY_GIT_MIRROR
+# @ECLASS_VARIABLE: TRINITY_GIT_MIRROR
# @DESCRIPTION:
# User (or ebuild) can select another git mirror if it's needed;
# Defaults to https://mirror.git.trinitydesktop.org/gitea/TDE/
-# @ECLASS-VARIABLE: TRINITY_GIT_BRANCH
+# @ECLASS_VARIABLE: TRINITY_GIT_BRANCH
# @DESCRIPTION:
# Specify git branch for live ebuilds. Default: master
-# @ECLASS-VARIABLE: TRINITY_COMMON_DOCS
+# @ECLASS_VARIABLE: TRINITY_COMMON_DOCS
# @DESCRIPTION:
# Common doc names that were found in trinity project's dirs.
TRINITY_COMMON_DOCS="AUTHORS BUGS CHANGELOG CHANGES COMMENTS COMPLIANCE COMPILING
@@ -121,11 +126,11 @@ TRINITY_COMMON_DOCS="AUTHORS BUGS CHANGELOG CHANGES COMMENTS COMPLIANCE COMPILIN
NOTES PLUGINS PORTING README SECURITY-HOLES TASKGROUPS TEMPLATE
TESTCASES THANKS THOUGHTS TODO VERSION"
-# @ECLASS-VARIABLE: TRINITY_TARBALL
-# @DESCRIPTION:
+# @ECLASS_VARIABLE: TRINITY_TARBALL
+# @DESCRIPTION:
# This variable holds the name of the tarboll with current module's source code.
-# @ECLASS-VARIABLE: TRINITY_BASE_SRC_URI
+# @ECLASS_VARIABLE: TRINITY_BASE_SRC_URI
# @DESCRIPTION:
# The top SRC_URI for all trinity packages
TRINITY_BASE_SRC_URI="http://www.mirrorservice.org/sites/trinitydesktop.org/trinity/releases"
@@ -146,10 +151,25 @@ if [[ "${BUILD_TYPE}" == "live" ]]; then
# S="${WORKDIR}/${TRINITY_MODULE_NAME}"
elif [[ "${BUILD_TYPE}" == "release" ]]; then
+ # @ECLASS_VARIABLE: mod_name
+ # @DESCRIPTION:
+ # Package name.
mod_name="${TRINITY_MODULE_NAME}"
+
+ # @ECLASS_VARIABLE: TRINITY_MODULE_VER
+ # @DESCRIPTION:
+ # This variable is for local use in ebuilds.
+ # This variable can be used to set the package version.
+
+ # @ECLASS_VARIABLE: mod_ver
+ # @DESCRIPTION:
+ # Package version.
mod_ver="${TRINITY_MODULE_VER:=${PV}}"
#Note: Only releases in the 14.0 series are presently supported.
+ # @ECLASS_VARIABLE: full_mod_name
+ # @DESCRIPTION:
+ # Full package name.
full_mod_name="${mod_name}-trinity-${mod_ver}"
TRINITY_TARBALL="${full_mod_name}.tar.xz"
@@ -165,8 +185,8 @@ else
fi
if [[ ${BUILD_TYPE} == live ]]; then
-# @ECLASS-VARIABLE: TRINITY_VER
-# @DEPRECATED
+# @ECLASS_VARIABLE: TRINITY_VER
+# @DEPRECATED: none
# @DESCRIPTION:
# Synonymous with SLOT, this was used as a clutch between eclass and ebuilds to
# set SLOT for release and live ebuilds by some means of version detection. But
@@ -178,13 +198,13 @@ if [[ ${BUILD_TYPE} == live ]]; then
[[ -z ${SLOT} ]] && SLOT=${TRINITY_VER}
fi
-# @ECLASS-VARIABLE: TDEDIR
+# @ECLASS_VARIABLE: TDEDIR
# @DESCRIPTION:
# Location of tdelibs to link against.
# TODO: Rethink prefixing
export TDEDIR="/usr/trinity/${TRINITY_VER}"
-# @ECLASS-VARIABLE: TDEDIRS
+# @ECLASS_VARIABLE: TDEDIRS
# @DESCRIPTION:
# TDE expects that the install path is listed first in TDEDIRS
# Reference: More information inside trinity-base/tdelibs package
@@ -218,12 +238,12 @@ fi
BDEPEND+=" ~trinity-base/trinity-cmake-${PV}"
if [[ -n "${TRINITY_EXTRAGEAR_PACKAGING}" ]]; then
-# @ECLASS-VARIABLE: TEG_PO_DIR
+# @ECLASS_VARIABLE: TEG_PO_DIR
# @DESCRIPTION:
# Change the translation directory for extragear packages. The default is ${S}/po
TEG_PO_DIR="${TEG_PO_DIR:-${S}/po}"
-# @ECLASS-VARIABLE: TEG_DOC_DIR
+# @ECLASS_VARIABLE: TEG_DOC_DIR
# @DESCRIPTION:
# Change the documentation directory for extragear packages. The default is ${S}/doc
TEG_DOC_DIR="${TEG_DOC_DIR:-${S}/doc}"
@@ -250,7 +270,7 @@ if [[ -n "${TRINITY_EXTRAGEAR_PACKAGING}" ]]; then
fi
fi
-# @ECLASS-VARIABLE: TRINITY_NEED_ARTS
+# @ECLASS_VARIABLE: TRINITY_NEED_ARTS
# @DESCRIPTION:
# Default value is "no". If set to "yes", add an unconditional dependency on
# trinity-base/arts and trinity-base/tdelibs[arts], if "optional" add both
diff --git a/eclass/trinity-functions-2.eclass b/eclass/trinity-functions-2.eclass
index d3b65fa0..aaae5be2 100644
--- a/eclass/trinity-functions-2.eclass
+++ b/eclass/trinity-functions-2.eclass
@@ -2,7 +2,11 @@
# Copyright 2020-2022 The Trinity Desktop Project
# Distributed under the terms of the GNU General Public License v2
-#
+# @ECLASS: trinity-functions-2.eclass
+# @MAINTAINER:
+# gentoo@trinitydesktop.org
+# @BLURB: common ebuild functions
+# @DESCRIPTION:
# Original Author: Alexander Golubev (Fat-Zer)
# Ported to git-r3 eclass and EAPI7 by E. Liddell
# Ported to cmake eclass and EAPI8 by ormorh
@@ -11,6 +15,9 @@
inherit multilib
+# @ECLASS_VARIABLE: TRINITY_LIVEVER
+# @DESCRIPTION:
+# Sets the version of the live assembly
TRINITY_LIVEVER="14.1.0"
# @FUNCTION: set-trinityver
@@ -92,6 +99,9 @@ adjust-trinity-paths() {
unset TDEROOTHOME
}
+# @FUNCTION: trinity_remove_path_component
+# @DESCRIPTION:
+# Removes the specified path from the PATH variable.
trinity_remove_path_component() {
local i new_path path_array
@@ -107,6 +117,9 @@ trinity_remove_path_component() {
echo "${new_path#:}"
}
+# @FUNCTION: trinity_prepand_path_component
+# @DESCRIPTION:
+# Prepares a list to be added to the PATH variable.
trinity_prepand_path_component() {
local new_path
@@ -176,6 +189,9 @@ need-arts() {
RDEPEND+=" ${my_depend}";
}
+# @FUNCTION: trinity_l10n_for_each_locale_do
+# @DESCRIPTION:
+# This function is required to build the locale.
trinity_l10n_for_each_locale_do() {
local locs x
@@ -191,6 +207,9 @@ trinity_l10n_for_each_locale_do() {
done
}
+# @FUNCTION: trinity-admin-prepare
+# @DESCRIPTION:
+# This function prepares the source for building.
trinity-admin-prepare() {
pushd "${PWD}/admin"
libtoolize -c || die "Error libtoolize"
@@ -199,11 +218,17 @@ trinity-admin-prepare() {
popd
}
+# @FUNCTION: trinity-gen-configure
+# @DESCRIPTION:
+# This function generates a configure script to build.
trinity-gen-configure() {
trinity-admin-prepare
emake -f admin/Makefile.common || die "Error creating configuration"
}
+# @FUNCTION: trinity-econf
+# @DESCRIPTION:
+# This function configures the assembly.
trinity-econf() {
local myconf
myconf=(--prefix="${TDEDIR}"
diff --git a/eclass/trinity-meta-2.eclass b/eclass/trinity-meta-2.eclass
index 2d4c9c70..e3fafb77 100644
--- a/eclass/trinity-meta-2.eclass
+++ b/eclass/trinity-meta-2.eclass
@@ -2,7 +2,12 @@
# Copyright 2020-2022 The Trinity Desktop Project
# Distributed under the terms of the GNU General Public License v2
-#
+# @ECLASS: trinity-meta-2.eclass
+# @MAINTAINER:
+# gentoo@trinitydesktop.org
+# @SUPPORTED_EAPIS: 7 8
+# @BLURB: common ebuild functions for trinity-meta packages
+# @DESCRIPTION:
# Original Author: fat-zer
# Ported to git-r3 eclass and EAPI7 by E. Liddell
# Ported to cmake eclass and EAPI8 by ormorh