summaryrefslogtreecommitdiffstats
path: root/eclass/trinity-base-2.eclass
diff options
context:
space:
mode:
authorormorph <[email protected]>2020-11-28 23:41:13 +0300
committerTDE Gitea <[email protected]>2020-11-29 18:54:37 +0000
commit11164d9db700785f36a7f91ed22e71497a1ebd4f (patch)
treeb9c497eb6affb74a1808afd635b844075c1f7213 /eclass/trinity-base-2.eclass
parent489fdb2e44dde725175f4828a4ed0871c6d53d44 (diff)
downloadtde-packaging-gentoo-11164d9db700785f36a7f91ed22e71497a1ebd4f.tar.gz
tde-packaging-gentoo-11164d9db700785f36a7f91ed22e71497a1ebd4f.zip
Added support for assemblies using the admin module
Signed-off-by: ormorph <[email protected]>
Diffstat (limited to 'eclass/trinity-base-2.eclass')
-rw-r--r--eclass/trinity-base-2.eclass50
1 files changed, 45 insertions, 5 deletions
diff --git a/eclass/trinity-base-2.eclass b/eclass/trinity-base-2.eclass
index e5ba4b24..e7604a6b 100644
--- a/eclass/trinity-base-2.eclass
+++ b/eclass/trinity-base-2.eclass
@@ -8,7 +8,27 @@
# Purpose: Support ebuilds for the Trinity Desktop (KDE3 fork).
#
-inherit trinity-functions-2 cmake-utils
+inherit trinity-functions-2
+
+# @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
+# is done using the 'trinity-econf' and 'emake' functions.
+# If set to "no", inherit cmake-utils.
+: ${TRINITY_BUILD_ADMIN:=no}
+
+
+case ${TRINITY_BUILD_ADMIN} in
+ yes)
+ ;;
+ no)
+ inherit cmake-utils
+ ;;
+ *)
+ eerror "Unknown value for \${CHECK_ADMIN}"
+ die "Value ${CHECK_ADMIN} is not supported"
+esac
# Don't use Gentoo mirrors
RESTRICT="mirror"
@@ -244,7 +264,12 @@ trinity-base-2_src_prepare() {
fi
fi
- cmake-utils_src_prepare
+ if [[ ${TRINITY_BUILD_ADMIN} == "yes" ]] ; then
+ trinity-gen-configure
+ eapply_user
+ elif [[ ${TRINITY_BUILD_ADMIN} == "no" ]] ; then
+ cmake-utils_src_prepare
+ fi
}
@@ -284,7 +309,11 @@ trinity-base-2_src_configure() {
"${mycmakeargs[@]}"
)
- cmake-utils_src_configure
+ if [[ ${TRINITY_BUILD_ADMIN} == "yes" ]] ; then
+ trinity-econf
+ elif [[ ${TRINITY_BUILD_ADMIN} == "no" ]] ; then
+ cmake-utils_src_configure
+ fi
}
# @FUNCTION: trinity-base-2_src_compile
@@ -293,7 +322,11 @@ trinity-base-2_src_configure() {
trinity-base-2_src_compile() {
debug-print-function ${FUNCNAME} "${@}"
- cmake-utils_src_compile
+ if [[ ${TRINITY_BUILD_ADMIN} == "yes" ]] ; then
+ emake
+ elif [[ ${TRINITY_BUILD_ADMIN} == "no" ]] ; then
+ cmake-utils_src_compile
+ fi
}
# @FUNCTION: trinity-base-2_src_install
@@ -301,7 +334,14 @@ trinity-base-2_src_compile() {
# Call standard cmake-utils_src_install and installs common documentation.
trinity-base-2_src_install() {
debug-print-function ${FUNCNAME} "${@}"
- cmake-utils_src_install
+
+ if [[ ${TRINITY_BUILD_ADMIN} == "yes" ]] ; then
+ if [[ ${TRINITY_MODULE_NAME} == "${PN}" ]] ; then
+ emake install DESTDIR="${D}"
+ fi
+ elif [[ ${TRINITY_BUILD_ADMIN} == "no" ]] ; then
+ cmake-utils_src_install
+ fi
if [[ -z "${TRINITY_BASE_NO_INSTALL_DOC}" ||
"${TRINITY_BASE_NO_INSTALL_DOC}" == "no" ]]; then