Trinity-*-2.eclass: Fix some typos and cleanup.

Signed-off-by: Chris <xchrisx@uber.space>
pull/22/head
Chris 4 years ago committed by TDE Gitea
parent 355b84074a
commit 084b0b62ec

@ -1,9 +1,11 @@
# Copyright 1999-2013 Gentoo Foundation # Copyright 1999-2013 Gentoo Foundation
# Copyright 2020 The Trinity Desktop Project
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
# $Header: $ # $Header: $
# #
# Original Author: fat-zer # Original Author: fat-zer
# Ported to git-r3 eclass and EAPI7 by E. Liddell
# Purpose: support ebuilds for the trinity project (a kde3 fork). # Purpose: support ebuilds for the trinity project (a kde3 fork).
# #
@ -61,8 +63,7 @@ echo "${TRINITY_MODULE_NAME:=${PN}}" >/dev/null
# This is a whitespace-separated list of translations this ebuild supports. # This is a whitespace-separated list of translations this ebuild supports.
# These translations are automatically added to IUSE. Therefore ebuilds must set # These translations are automatically added to IUSE. Therefore ebuilds must set
# this variable before inheriting any eclasses. To enable only selected # this variable before inheriting any eclasses. To enable only selected
# translations, ebuilds must call enable_selected_linguas(). kde4-{base,meta}.eclass does # translations, ebuilds must call enable_selected_linguas().
# this for you.
# @ECLASS-VARIABLE: TRINITY_HANDBOOK # @ECLASS-VARIABLE: TRINITY_HANDBOOK
# @DESCRIPTION: # @DESCRIPTION:
@ -177,10 +178,11 @@ fi
# @FUNCTION: trinity-base-2_src_unpack # @FUNCTION: trinity-base-2_src_unpack
# @DESCRIPTION: # @DESCRIPTION:
# A default src unpack function to be call git-v3_src_unpack either # A default src unpack function to either call
# git-r3_src_unpack or base_src_unpack.
trinity-base-2_src_unpack() { trinity-base-2_src_unpack() {
if [[ ${BUILD_TYPE} = live ]]; then if [[ ${BUILD_TYPE} = live ]]; then
git-v3_src_unpack git-r3_src_unpack
else else
base_src_unpack base_src_unpack
fi fi
@ -260,7 +262,7 @@ trinity-base-2_src_configure() {
fi fi
if [[ "${TRINITY_HANDBOOK}" == optional ]]; then if [[ "${TRINITY_HANDBOOK}" == optional ]]; then
eg_cmakeargs=( eg_cmakeargs=(
$(cmake-utils_use_with handbook DOC) -DWITH_DOC="$(usex handbook)"
"${eg_cmakeargs[@]}" ) "${eg_cmakeargs[@]}" )
fi fi
fi fi
@ -272,7 +274,7 @@ trinity-base-2_src_configure() {
"${mycmakeargs[@]}" "${mycmakeargs[@]}"
) )
# $([[ "${TRINITY_NEED_ARTS}" == "optional" ]] && (cmake-utils_use_with arts ARTS)) # $([[ "${TRINITY_NEED_ARTS}" == "optional" ]] && (-DWITH_ARTS="$(usex arts)"))
cmake-utils_src_configure cmake-utils_src_configure
} }

@ -1,9 +1,11 @@
# Copyright 1999-2013 Gentoo Foundation # Copyright 1999-2013 Gentoo Foundation
# Copyright 2020 The Trinity Desktop Project
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
# $Header: $ # $Header: $
# #
# Original Author: Alexander Golubev (Fat-Zer) # Original Author: Alexander Golubev (Fat-Zer)
# Ported to git-r3 eclass and EAPI7 by E. Liddell
# Purpose: basic trinity functions and variables # Purpose: basic trinity functions and variables
# #
@ -24,7 +26,7 @@ set-trinityver() {
# - trinity-base category ebuilds go into /usr/trinity/$ETRINITY_VER, # - trinity-base category ebuilds go into /usr/trinity/$ETRINITY_VER,
# and have SLOT="$MAJORVER.$MINORVER". # and have SLOT="$MAJORVER.$MINORVER".
# - This function exports $PREFIX (location to install to) and $TDEDIR # - This function exports $PREFIX (location to install to) and $TDEDIR
# (location of kdelibs to link against) for all ebuilds. # (location of tdelibs to link against) for all ebuilds.
# get version elements # get version elements
if [[ -n "$1" ]]; then if [[ -n "$1" ]]; then
@ -43,9 +45,9 @@ set-trinityver() {
export TDEDIR="/usr/trinity/${TRINITY_VER}" export TDEDIR="/usr/trinity/${TRINITY_VER}"
export TDEDIRS="/usr/trinity/${TRINITY_VER}" export TDEDIRS="/usr/trinity/${TRINITY_VER}"
# this sould solve problems like "cannot find libraries", especially when # This should solve problems like "cannot find libraries",
# compiling tdelibs # especially when compiling tdelibs.
# NOTE: binaries which run during compilation and try to load shared # NOTE: Binaries which run during compilation and try to load shared
# libraries from the TDE directory (which may be broken) may still # libraries from the TDE directory (which may be broken) may still
# break compilation of tdelibs(?) # break compilation of tdelibs(?)
# TODO: fix that issue for tdelibs # TODO: fix that issue for tdelibs
@ -55,7 +57,7 @@ set-trinityver() {
# @FUNCTION: get-trinity-libdirs # @FUNCTION: get-trinity-libdirs
# @USAGE: # @USAGE:
# @DESCRIPTION: # @DESCRIPTION:
# lists all the trinity library directories # Lists all the trinity library directories.
get-trinity-libdirs() { get-trinity-libdirs() {
local rv local rv
for libdir in $(get_all_libdirs); do for libdir in $(get_all_libdirs); do
@ -66,7 +68,7 @@ get-trinity-libdirs() {
# @FUNCTION: adjust-trinity-paths # @FUNCTION: adjust-trinity-paths
# @USAGE: < version > # @USAGE: < version >
# @DESCRIPTION: # @DESCRIPTION:
# Adjust PATH LDPATH and LD_LIBRARY_PATH to see only current trinity version # Adjusts PATH LDPATH and LD_LIBRARY_PATH to see only current trinity version.
adjust-trinity-paths() { adjust-trinity-paths() {
debug-print-function $FUNCNAME "$@" debug-print-function $FUNCNAME "$@"
local libdir local libdir
@ -135,15 +137,15 @@ need-trinity() {
# @ECLASS-VARIABLE: TRINITY_NEED_ARTS # @ECLASS-VARIABLE: TRINITY_NEED_ARTS
# @DESCRIPTION: # @DESCRIPTION:
# This variable is set by the need-arts function. Possible arguments values 'yes', 'no' and 'optional' # This variable is set by the need-arts function.
# Default is 'no' # Possible arguments are 'yes', 'no' and 'optional'. Default is 'no'.
TRINITY_NEED_ARTS="no" TRINITY_NEED_ARTS="no"
# @FUNCTION: need-arts # @FUNCTION: need-arts
# @USAGE: need-arts <yes|optional> # @USAGE: need-arts <yes|optional>
# @DESCRIPTION: # @DESCRIPTION:
# This function adds DEPENDs for aRTs support. Possible arguments are 'yes' and 'optional' # This function adds DEPENDs for aRTs support.
# 'yes' means arts is required, 'optional' results in USE flag arts. # Possible arguments are 'yes' and 'optional' 'yes' means arts is required, 'optional' results in USE flag arts.
# NOTE: this function modifies IUSE DEPEND and RDEPEND variables, so if you call it before setting # NOTE: this function modifies IUSE DEPEND and RDEPEND variables, so if you call it before setting
# those variables don't forget to include the previously set value when you set them again. # those variables don't forget to include the previously set value when you set them again.
need-arts() { need-arts() {

@ -1,28 +1,30 @@
# Copyright 1999-2013 Gentoo Foundation # Copyright 1999-2013 Gentoo Foundation
# Copyright 2020 The Trinity Desktop Project
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
# $Header: $ # $Header: $
# #
# Original Author: fat-zer # Original Author: fat-zer
# Ported to git-r3 eclass and EAPI7 by E. Liddell
# Purpose: make easy to install trinity ebuilds. # Purpose: make easy to install trinity ebuilds.
# #
inherit trinity-base-2 trinity-functions-2 cmake-utils inherit trinity-base-2 trinity-functions-2 cmake-utils
LICENSE="GPL-2 LGPL-2" LICENSE="|| ( GPL-2 GPL-3 )"
HOMEPAGE="http://www.trinitydesktop.org/" HOMEPAGE="http://www.trinitydesktop.org/"
# set slot, TDEDIR, TRINITY_VER and PREFIX # Set slot, TDEDIR, TRINITY_VER and PREFIX
set-trinityver set-trinityver
[[ -z "$SLOT" ]] && SLOT="$TRINITY_VER" [[ -z "$SLOT" ]] && SLOT="$TRINITY_VER"
# common dependencies # Common dependencies
DEPEND="trinity-base/tdelibs:${SLOT}" DEPEND="trinity-base/tdelibs:${SLOT}"
# @FUNCTION: trinity-meta-2_set_trinity_submodule # @FUNCTION: trinity-meta-2_set_trinity_submodule
# @DESCRIPTION: # @DESCRIPTION:
# sets the TRINITY_SUBMODULE variable to nth value obtained from ${PN} # Sets the TRINITY_SUBMODULE variable to
# if it isn't set yet # the value obtained from ${PN} if it isn't set yet.
trinity-meta-2_set_trinity_submodule() { trinity-meta-2_set_trinity_submodule() {
debug-print-function $FUNCNAME "$@" debug-print-function $FUNCNAME "$@"
@ -33,8 +35,8 @@ trinity-meta-2_set_trinity_submodule() {
# @FUNCTION: trinity-meta-2_src_pkg_setup # @FUNCTION: trinity-meta-2_src_pkg_setup
# @DESCRIPTION: # @DESCRIPTION:
# Default pkg_setup function. It sets the correct ${S} # Default pkg_setup function.
# nessecary files. # It sets the correct ${S} necessary files.
trinity-meta-2_pkg_setup() { trinity-meta-2_pkg_setup() {
debug-print-function ${FUNCNAME} "$@" debug-print-function ${FUNCNAME} "$@"
adjust-trinity-paths adjust-trinity-paths
@ -44,15 +46,15 @@ trinity-meta-2_pkg_setup() {
# @FUNCTION: trinity-meta-2_src_unpack # @FUNCTION: trinity-meta-2_src_unpack
# @DESCRIPTION: # @DESCRIPTION:
# Default source extract function. It tries to unpack only # Default source extract function.
# necessary files. # It tries to unpack only necessary files.
trinity-meta-2_src_unpack() { trinity-meta-2_src_unpack() {
debug-print-function ${FUNCNAME} "$@" debug-print-function ${FUNCNAME} "$@"
if [[ ${BUILD_TYPE} = live ]]; then if [[ ${BUILD_TYPE} = live ]]; then
case "${TRINITY_SCM}" in case "${TRINITY_SCM}" in
git) git)
git-2_src_unpack git-r3_src_unpack
;; ;;
*) die "TRINITY_SCM: ${TRINITY_SCM} is not supported by ${FUNCNAME}" ;; *) die "TRINITY_SCM: ${TRINITY_SCM} is not supported by ${FUNCNAME}" ;;
esac esac
@ -62,8 +64,8 @@ trinity-meta-2_src_unpack() {
# @FUNCTION: trinity-meta-2_src_extract # @FUNCTION: trinity-meta-2_src_extract
# @DESCRIPTION: # @DESCRIPTION:
# A function to extract the source for a split KDE ebuild. # A function to extract the source for a split TDE ebuild.
# Also see KMMODULE, KMEXTRACT # Also see KMMODULE, KMEXTRACT.
trinity-meta-2_src_extract() { trinity-meta-2_src_extract() {
debug-print-function ${FUNCNAME} "$@" debug-print-function ${FUNCNAME} "$@"
@ -72,7 +74,7 @@ trinity-meta-2_src_extract() {
if [[ "${BUILD_TYPE}" = live ]]; then if [[ "${BUILD_TYPE}" = live ]]; then
einfo "Exporting parts of working copy to ${S}" einfo "Exporting parts of working copy to ${S}"
case "$TRINITY_SCM" in case "$TRINITY_SCM" in
git) # nothing we can do to prevent git from unpacking code git) # Nothing we can do to prevent git from unpacking code
;; ;;
*) die "TRINITY_SCM: ${TRINITY_SCM} is not supported by ${FUNCNAME}" *) die "TRINITY_SCM: ${TRINITY_SCM} is not supported by ${FUNCNAME}"
esac esac
@ -140,20 +142,20 @@ trinity-meta-2_rsync_copy() {
# @FUNCTION: trinity-meta_create_extractlists # @FUNCTION: trinity-meta_create_extractlists
# @DESCRIPTION: # @DESCRIPTION:
# Create lists of files and subdirectories to extract. # Creates lists of files and subdirectories to extract.
# Also see descriptions of KMMODULE and KMEXTRACT # Also see descriptions of KMMODULE and KMEXTRACT.
trinity-meta-2_create_extractlists() { trinity-meta-2_create_extractlists() {
debug-print-function ${FUNCNAME} "$@" debug-print-function ${FUNCNAME} "$@"
local submod local submod
# if $TSM_EXTRACT is not set assign it to dirs named in TRINITY_SUBMODULE # If $TSM_EXTRACT is not set assign it to dirs named in TRINITY_SUBMODULE
if [ -z "${TSM_EXTRACT}" ]; then if [ -z "${TSM_EXTRACT}" ]; then
for submod in ${TRINITY_SUBMODULE}; do for submod in ${TRINITY_SUBMODULE}; do
TSM_EXTRACT="${TSM_EXTRACT} ${submod}/" TSM_EXTRACT="${TSM_EXTRACT} ${submod}/"
done done
fi fi
# add package-specific files and directories # Add package-specific files and directories
case "${TRINITY_MODULE_NAME}" in case "${TRINITY_MODULE_NAME}" in
tdebase) TSM_EXTRACT_LIST+=" kcontrol/" ;; tdebase) TSM_EXTRACT_LIST+=" kcontrol/" ;;
*) ;; # nothing special for other modules *) ;; # nothing special for other modules
@ -197,7 +199,7 @@ trinity-meta-2_src_prepare() {
# @FUNCTION: trinity-meta-2_src_configure # @FUNCTION: trinity-meta-2_src_configure
# @DESCRIPTION: # @DESCRIPTION:
# Default source configure function. It sets apropriate cmake args. # Default source configure function. It sets apropriate cmake args.
# Also see description of KMMODULE # Also see description of KMMODULE.
trinity-meta-2_src_configure() { trinity-meta-2_src_configure() {
debug-print-function ${FUNCNAME} "$@" debug-print-function ${FUNCNAME} "$@"
@ -219,7 +221,7 @@ trinity-meta-2_src_configure() {
# @FUNCTION: trinity-meta-2_src_compile # @FUNCTION: trinity-meta-2_src_compile
# @DESCRIPTION: # @DESCRIPTION:
# Just call trinity-base_src_compile. # Just calls trinity-base_src_compile.
trinity-meta-2_src_compile() { trinity-meta-2_src_compile() {
debug-print-function ${FUNCNAME} "$@" debug-print-function ${FUNCNAME} "$@"
@ -228,7 +230,7 @@ trinity-meta-2_src_compile() {
# @FUNCTION: trinity-meta-2_src_install # @FUNCTION: trinity-meta-2_src_install
# @DESCRIPTION: # @DESCRIPTION:
# Call default cmake install function. and install documentation. # Calls default cmake install function and installs documentation.
trinity-meta-2_src_install() { trinity-meta-2_src_install() {
debug-print-function ${FUNCNAME} "$@" debug-print-function ${FUNCNAME} "$@"

Loading…
Cancel
Save