Moved EAPI 7 eclasses to trinity-[foo]-2.eclass; 14.0.6 ebuilds for tqt, tqtinterface, dbus-1-tqt, tdelibs amended to work with new eclasses

Signed-off-by: E. Liddell <ejlddll@warpmail.net>
pull/5/head
E. Liddell 4 years ago committed by TDE Gitea
parent 3ffa67c73f
commit caa72c95de

@ -5,7 +5,7 @@ EAPI="7"
TRINITY_MODULE_TYPE="dependencies"
TRINITY_MODULE_NAME="dbus-1-tqt"
inherit trinity-base
inherit trinity-base-2
DESCRIPTION="D-BUS TQt bindings"
HOMEPAGE="http://trinitydesktop.org/"

@ -5,7 +5,7 @@ EAPI="7"
TRINITY_MODULE_TYPE="dependencies"
TRINITY_MODULE_NAME="${PN}"
inherit trinity-base
inherit trinity-base-2
DESCRIPTION="Interface and abstraction library for TQt and Trinity"
HOMEPAGE="http://trinitydesktop.org/"

@ -0,0 +1,400 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
#
# Original Author: fat-zer
# Purpose: support ebuilds for the trinity project (a kde3 fork).
#
RESTRICT=network-sandbox
inherit trinity-functions-2 cmake-utils
addwrite "/usr/tqt3/etc/settings"
addpredict "/usr/tqt3/etc/settings"
# ban EAPI 0-6
case $EAPI in
0|1|2|3|4|5|6) die "EAPI=${EAPI} is not supported" ;;
7) ;;
*) die "Unknown EAPI=${EAPI}"
esac
# @ECLASS-VARIABLE: BUILD_TYPE
# @DESCRIPTION:
# Determines the build type: live or release
if [[ ${PV} = *9999* ]]; then
BUILD_TYPE="live"
else
BUILD_TYPE="release"
fi
export BUILD_TYPE
# @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
# @DESCRIPTION:
# Determines which version control system code is checking out live ebuilds from.
# @ECLASS-VARIABLE: TMP_DOCDIR
# @DESCRIPTION:
# A temporary directory used to copy common documentation before installing it
#
# @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
# @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
# @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(). kde4-{base,meta}.eclass does
# this for you.
# @ECLASS-VARIABLE: TRINITY_HANDBOOK
# @DESCRIPTION:
# Set to enable handbook in application. Possible values are 'always', 'optional'
# (handbook USE flag) and 'never'.
# This variable must be set before inheriting any eclasses. Defaults to 'never'.
# Also ensures buildtime and runtime dependencies are met.
TRINITY_HANDBOOK="${TRINITY_HANDBOOK:-never}"
# @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
# @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
# @DESCRIPTION:
# Specify git branch for live ebuilds. Default: master
# @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
CONFIG_FORMAT CONFIGURING COPYING COPYRIGHT CREDITS DEBUG DESIGN FAQ
HACKING HISTORY HOWTO IDEAS INSTALL LICENSE MAINTAINERS NAMING NEWS
NOTES PLUGINS PORTING README SECURITY-HOLES TASKGROUPS TEMPLATE
TESTCASES THANKS THOUGHTS TODO VERSION"
# @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
# @DESCRIPTION:
# The top SRC_URI for all trinity packages
TRINITY_BASE_SRC_URI="http://www.mirrorservice.org/sites/trinitydesktop.org/trinity/releases"
#reset TRINITY_SCM and inherit proper eclass
if [[ ${BUILD_TYPE} = live ]]; then
# set default TRINITY_SCM if not set
[[ -z "$TRINITY_SCM" ]] && TRINITY_SCM=git
case ${TRINITY_SCM} in
git) inherit git-r3 ;;
*) die "Unsupported TRINITY_SCM=${TRINITY_SCM}" ;;
esac
#set some variables
EGIT_REPO_URI="${TRINITY_GIT_MIRROR:=https://mirror.git.trinitydesktop.org/gitea/TDE/${TRINITY_MODULE_NAME}}"
EGIT_BRANCH="${TRINITY_GIT_BRANCH:=master}"
# S="${WORKDIR}/${TRINITY_MODULE_NAME}"
elif [[ "${BUILD_TYPE}" == release ]]; then
mod_name="${TRINITY_MODULE_NAME}"
mod_ver="${TRINITY_MODULE_VER:=${PV}}"
#Note: Only releases in the 14.0 series are presently supported.
full_mod_name="${mod_name}-trinity-${mod_ver}"
TRINITY_TARBALL="${full_mod_name}.tar.xz"
if [[ -n "${TRINITY_MODULE_TYPE}" ]] ; then
SRC_URI="${TRINITY_BASE_SRC_URI}/R${mod_ver}/main/${TRINITY_MODULE_TYPE}/$TRINITY_TARBALL"
else
SRC_URI="${TRINITY_BASE_SRC_URI}/R${mod_ver}/main/$TRINITY_TARBALL"
fi
S="${WORKDIR}/${full_mod_name}"
else
die "Unknown BUILD_TYPE=${BUILD_TYPE}"
fi
if [[ -n "${TRINITY_EXTRAGEAR_PACKAGING}" ]]; then
# @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
# @DESCRIPTION:
# Change the documentation directory for extragear packages. The default is
# ${S}/doc
TEG_DOC_DIR="${TEG_DOC_DIR:-${S}/doc}"
if [[ -n "${TRINITY_LANGS}" || -n "${TRINITY_DOC_LANGS}" ]]; then
for lang in ${TRINITY_LANGS} ${TRINITY_DOC_LANGS}; do
IUSE="${IUSE} linguas_${lang}"
done
trinityhandbookdepend="
app-text/docbook-xml-dtd:4.2
app-text/docbook-xsl-stylesheets
"
case ${TRINITY_HANDBOOK} in
yes | always)
DEPEDND+=" ${trinityhandbookdepend}"
;;
optional)
IUSE+=" +handbook"
DEPEND+=" handbook? ( ${trinityhandbookdepend} )"
;;
*) ;;
esac
fi
fi
# @FUNCTION: trinity-base-2_src_unpack
# @DESCRIPTION:
# A default src unpack function to be call git-v3_src_unpack either
trinity-base-2_src_unpack() {
if [[ ${BUILD_TYPE} = live ]]; then
git-v3_src_unpack
else
base_src_unpack
fi
}
# @FUNCTION: trinity-base-2_src_prepare
# @DESCRIPTION:
# General pre-configure and pre-compile function for Trinity applications.
trinity-base-2_src_prepare() {
debug-print-function ${FUNCNAME} "$@"
local dir lang
# SCM bootstrap--removed on the grounds that if you got this far,
# you have to be using git
# Apply patches
eapply_user
# Handle documentation and translations for extragear packages
if [[ -n "$TRINITY_EXTRAGEAR_PACKAGING" ]]; then
# remove languages that have not been selected
if [[ -n $TRINITY_LANGS ]]; then
einfo "Removing unselected translations from ${TEG_PO_DIR}"
for dir in $(find ${TEG_PO_DIR} -mindepth 1 -maxdepth 1 -type d ); do
lang="$(basename "$dir")"
if ! has "$lang" ${TRINITY_LANGS}; then
eerror "Translation $lang seems to present in the package but is not supported by the ebuild"
elif ! has $lang ${LINGUAS}; then
rm -rf $dir
fi
done
fi
# if we removed all translations we should point it
if [[ -z $(find ${TEG_PO_DIR} -mindepth 1 -maxdepth 1 -type d) ]]; then
TRINITY_NO_TRANSLATIONS=yes
fi
# remove not selected documentation
if [[ -n $TRINITY_DOC_LANGS ]]; then
einfo "Removing unselected documentation from ${TEG_DOC_DIR}"
for dir in $(find ${TEG_DOC_DIR} -mindepth 1 -maxdepth 1 -type d ); do
lang="$(basename "$dir")"
if [[ "$lang" == "${PN}" || \
"$lang" == "${TRINITY_MODULE_NAME}" ]] ; then
echo -n; # do nothing it's main documentation
elif ! has "$lang" ${TRINITY_LANGS}; then
eerror "Documentation translated to language $lang seems to present in the package but is not supported by the ebuild"
elif ! has $lang ${LINGUAS}; then
rm -rf $dir
fi
done
fi
fi
cmake-utils_src_prepare
}
# @FUNCTION: trinity-base-2_src_configure
# @DESCRIPTION:
# Call standard cmake-utils_src_onfigure and add some common arguments.
trinity-base-2_src_configure() {
debug-print-function ${FUNCNAME} "$@"
local eg_cmakeargs
[[ -n "${PREFIX}" ]] && export PREFIX="${TDEDIR}"
if [[ -n "$TRINITY_EXTRAGEAR_PACKAGING" ]]; then
eg_cmakeargs=( -DBUILD_ALL=ON )
if [[ "$TRINITY_NO_TRANSLATIONS" == "yes" ]]; then
eg_cmakeargs=( -DBUILD_TRANSLATIONS=OFF "${eg_cmakeargs[@]}" )
else
eg_cmakeargs=( -DBUILD_TRANSLATIONS=ON "${eg_cmakeargs[@]}" )
fi
if [[ "${TRINITY_HANDBOOK}" == optional ]]; then
eg_cmakeargs=(
$(cmake-utils_use_with handbook DOC)
"${eg_cmakeargs[@]}" )
fi
fi
mycmakeargs=(
-DCMAKE_INSTALL_PREFIX="${EPREFIX}${TDEDIR}"
-DCMAKE_INSTALL_RPATH="${EPREFIX}${TDEDIR}"
"${eg_cmakeargs[@]}"
"${mycmakeargs[@]}"
)
# $([[ "${TRINITY_NEED_ARTS}" == "optional" ]] && (cmake-utils_use_with arts ARTS))
cmake-utils_src_configure
}
# @FUNCTION: trinity-base-2_src_compile
# @DESCRIPTION:
# Just call cmake-utils_src_compile.
trinity-base-2_src_compile() {
debug-print-function ${FUNCNAME} "$@"
cmake-utils_src_compile
}
# @FUNCTION: trinity-base-2_src_install
# @DESCRIPTION:
# Call standard cmake-utils_src_install and installs common documentation.
trinity-base-2_src_install() {
debug-print-function ${FUNCNAME} "$@"
cmake-utils_src_install
# trinity-base_fix_desktop_files
if [[ -z "$TRINITY_BASE_NO_INSTALL_DOC" ||
"$TRINITY_BASE_NO_INSTALL_DOC" == "no" ]]; then
trinity-base-2_create_tmp_docfiles
trinity-base-2_install_docfiles
fi
}
# @FUNCTION: trinity-base-2_create_tmp_docfiles
# @DESCRIPTION:
# Create docfiles in the form ${TMP_DOCDIR}/path.to.docfile.COMMON_NAME
# Also see the description for TRINITY_COMMON_DOCS and TMP_DOCDIR.
trinity-base-2_create_tmp_docfiles() {
debug-print-function ${FUNCNAME} "$@"
local srcdirs dir docfile targetdoc
if [[ -z "$TMP_DOCDIR" || ! -d "$TMP_DOCDIR" ]] ; then
TMP_DOCDIR="$T/docs"
mkdir -p ${TMP_DOCDIR}
fi
if [[ -z "$@" ]] ; then
srcdirs="./"
else
srcdirs="$@"
fi
einfo "Generating documentation list..."
for dir in $srcdirs; do
for doc in ${TRINITY_COMMON_DOCS}; do
for docfile in $(find $dir -type f -name "*${doc}*"); do
targetdoc="${docfile//\//.}"
targetdoc="${targetdoc#..}"
cp "${docfile}" "$TMP_DOCDIR/${targetdoc}"
done
done
done
}
# @FUNCTION: trinity-base-2_install_docfiles
# @DESCRIPTION:
# Install documentation from ${TMP_DOCDIR} or from first argument.
trinity-base-2_install_docfiles() {
debug-print-function ${FUNCNAME} "$@"
local doc docdir
[[ -n "$TMP_DOCDIR" ]] && docdir="$TMP_DOCDIR"
[[ -n "$1" ]] && docdir="$1"
[[ -z "$docdir" ]] && die "docdir is not set in ${FUNCNAME}."
pushd "${docdir}" >/dev/null
find . -maxdepth 1 -type f | while read doc; do
einfo "Installing documentation: ${doc##*/}"
dodoc "${doc}"
done
popd >/dev/null
}
# @FUNCTION: trinity-base_fix_desktop_files
# @DESCRIPTION: OBSOLETE??????
# Perform desktop files modifications according to current version. You can pass
# either desktop files or direcories to the parametrs. In case you'd pass a
# directory the function will recursively search for all desktop files and
# modify them. If no argument specified the function assume to work on the ${D};
#trinity-base_fix_desktop_files() {
# # Test if we have to perform any file fixing for current version
# case "3.5" in
# *${TRINITY_VER}*);;
# *) return 0 ;;
# esac
#
# local file_list dir_list f
#
# if [ "$#" != 0 ]; then
# # Get directories and files from arguments
# for f in $@; do
# if [ -f "$f" ]; then
# file_list+=" $f"
# elif [ -d "$f" ]; then
# dir_list+=" $f"
# else
# eerror "${FUNCNAME}: bad argument type: $(stat -c %F "$f")"
# fi
# done
# else
# dir_list="${D}"
# fi
#
# # Recursivly search for desktop files in directories
# for f in $dir_list; do
# file_list+="$(find ${f} -type f -name '*.desktop')"
# done
#
# # Performe the updates
# case "${TRINITY_VER}" in
# 3.5)
# for f in $file_list; do
# sed -i '/^OnlyShowIn=/s/KDE/TDE/g' "$f"
# done;;
# esac
#}
EXPORT_FUNCTIONS src_configure src_compile src_install src_prepare

@ -4,25 +4,28 @@
#
# Original Author: fat-zer
# Purpose: support ebuilds for the trinity project (a kde3 fork).
# Purpose: support planty of ebuilds for trinity project (a kde3 fork).
#
RESTRICT=network-sandbox
inherit trinity-functions cmake-utils
inherit trinity-functions cmake-utils base
# FIXME we don't need to write to both
addwrite "/usr/qt/3/etc/settings"
addpredict "/usr/qt/3/etc/settings"
addwrite "/usr/tqt3/etc/settings"
addpredict "/usr/tqt3/etc/settings"
# ban EAPI 0-6
# ban EAPI 0, 1 and 2
case $EAPI in
0|1|2|3|4|5|6) die "EAPI=${EAPI} is not supported" ;;
7) ;;
0|1|2|3|4) die "EAPI=${EAPI} is not supported" ;;
5) ;;
*) die "Unknown EAPI=${EAPI}"
esac
# @ECLASS-VARIABLE: BUILD_TYPE
# @DESCRIPTION:
# Determines the build type: live or release
# Determins he build type: live or release
if [[ ${PV} = *9999* ]]; then
BUILD_TYPE="live"
else
@ -38,7 +41,8 @@ echo "${TRINITY_MODULE_NAME:=${PN}}" >/dev/null
# @ECLASS-VARIABLE: TRINITY_SCM
# @DESCRIPTION:
# Determines which version control system code is checking out live ebuilds from.
# Determins from what version control system code is chiking out for live
# ebuilds.
# @ECLASS-VARIABLE: TMP_DOCDIR
# @DESCRIPTION:
@ -46,8 +50,8 @@ echo "${TRINITY_MODULE_NAME:=${PN}}" >/dev/null
#
# @ECLASS-VARIABLE: TRINTY_BASE_NO_INSTALL_DOC
# @DESCRIPTION:
# if set to anything except "no" this variable prevents
# trinity-base_src_install() from installing documentation
# if setted to anything except "no" this variable prevents
# trinity-base_src_install() to install documentation
#
# @ECLASS-VARIABLE: TRINTY_LANGS
@ -55,7 +59,8 @@ echo "${TRINITY_MODULE_NAME:=${PN}}" >/dev/null
# 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().
# translations, ebuilds must call enable_selected_linguas(). kde4-{base,meta}.eclass does
# this for you.
# @ECLASS-VARIABLE: TRINTY_DOC_LANGS
# @DESCRIPTION:
@ -70,7 +75,7 @@ echo "${TRINITY_MODULE_NAME:=${PN}}" >/dev/null
# Set to enable handbook in application. Possible values are 'always', 'optional'
# (handbook USE flag) and 'never'.
# This variable must be set before inheriting any eclasses. Defaults to 'never'.
# Also ensures buildtime and runtime dependencies are met.
# As well It ensures buildtime and runtime dependencies.
TRINITY_HANDBOOK="${TRINITY_HANDBOOK:-never}"
# @ECLASS-VARIABLE: TRINITY_EXTRAGEAR_PACKAGING
@ -82,8 +87,8 @@ TRINITY_HANDBOOK="${TRINITY_HANDBOOK:-never}"
# @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/
# User (or ebuild) can decide another git mirror if it's needed;
# Defaults to http://scm.trinitydesktop.org/scm/git
# @ECLASS-VARIABLE: TRINITY_GIT_BRANCH
# @DESCRIPTION:
@ -91,7 +96,7 @@ TRINITY_HANDBOOK="${TRINITY_HANDBOOK:-never}"
# @ECLASS-VARIABLE: TRINITY_COMMON_DOCS
# @DESCRIPTION:
# Common doc names that were found in trinity project's dirs.
# Common doc names that was found in trinity project's dirs.
TRINITY_COMMON_DOCS="AUTHORS BUGS CHANGELOG CHANGES COMMENTS COMPLIANCE COMPILING
CONFIG_FORMAT CONFIGURING COPYING COPYRIGHT CREDITS DEBUG DESIGN FAQ
HACKING HISTORY HOWTO IDEAS INSTALL LICENSE MAINTAINERS NAMING NEWS
@ -105,7 +110,8 @@ TRINITY_COMMON_DOCS="AUTHORS BUGS CHANGELOG CHANGES COMMENTS COMPLIANCE COMPILIN
# @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"
TRINITY_BASE_SRC_URI="http://www.mirrorservice.org/sites/trinitydesktop.org/trinity/releases/"
# TRINITY_BASE_SRC_URI="http://trinity.blackmag.net/releases" # the old one
#reset TRINITY_SCM and inherit proper eclass
if [[ ${BUILD_TYPE} = live ]]; then
@ -113,27 +119,40 @@ if [[ ${BUILD_TYPE} = live ]]; then
[[ -z "$TRINITY_SCM" ]] && TRINITY_SCM=git
case ${TRINITY_SCM} in
git) inherit git-r3 ;;
git) inherit git-2 ;;
*) die "Unsupported TRINITY_SCM=${TRINITY_SCM}" ;;
esac
#set some variables
EGIT_REPO_URI="${TRINITY_GIT_MIRROR:=https://mirror.git.trinitydesktop.org/gitea/TDE/${TRINITY_MODULE_NAME}}"
EGIT_BRANCH="${TRINITY_GIT_BRANCH:=master}"
# S="${WORKDIR}/${TRINITY_MODULE_NAME}"
#set some varyables
case ${TRINITY_SCM} in
git)
EGIT_REPO_URI="${TRINITY_GIT_MIRROR:=https://mirror.git.trinitydesktop.org/gitea/TDE}/${TRINITY_MODULE_NAME}"
EGIT_BRANCH="${TRINITY_GIT_BRANCH:=master}"
EGIT_PROJECT="trinity/${TRINITY_MODULE_NAME}"
EGIT_HAS_SUBMODULES="yes"
;;
esac
S="${WORKDIR}/${TRINITY_MODULE_NAME}"
elif [[ "${BUILD_TYPE}" == release ]]; then
mod_name="${TRINITY_MODULE_NAME}"
mod_ver="${TRINITY_MODULE_VER:=${PV}}"
#Note: Only releases in the 14.0 series are presently supported.
full_mod_name="${mod_name}-trinity-${mod_ver}"
TRINITY_TARBALL="${full_mod_name}.tar.xz"
case ${mod_ver} in
3.5.13.1)
full_mod_name="${mod_name}-${mod_ver}"
TRINITY_TARBALL="${full_mod_name}.tar.gz" ;;
3.5.13.2)
full_mod_name="${mod_name}-trinity-${mod_ver}"
TRINITY_TARBALL="${full_mod_name}.tar.xz" ;;
*)
full_mod_name="${mod_name}-${mod_ver}"
TRINITY_TARBALL="${full_mod_name}.tar.xz"
esac
if [[ -n "${TRINITY_MODULE_TYPE}" ]] ; then
SRC_URI="${TRINITY_BASE_SRC_URI}/R${mod_ver}/main/${TRINITY_MODULE_TYPE}/$TRINITY_TARBALL"
SRC_URI="${TRINITY_BASE_SRC_URI}/${mod_ver}/${TRINITY_MODULE_TYPE}/$TRINITY_TARBALL"
else
SRC_URI="${TRINITY_BASE_SRC_URI}/R${mod_ver}/main/$TRINITY_TARBALL"
SRC_URI="${TRINITY_BASE_SRC_URI}/${mod_ver}/$TRINITY_TARBALL"
fi
S="${WORKDIR}/${full_mod_name}"
@ -178,10 +197,16 @@ fi
# @FUNCTION: trinity-base_src_unpack
# @DESCRIPTION:
# A default src unpack function to be call git-v3_src_unpack either
# A default src unpack function to be call git-2_src_unpack either
trinity-base_src_unpack() {
if [[ ${BUILD_TYPE} = live ]]; then
git-v3_src_unpack
case "${TRINITY_SCM}" in
git)
git-2_src_unpack
;;
*) die "TRINITY_SCM: ${TRINITY_SCM} is not supported by ${FUNCNAME}" ;;
esac
else
base_src_unpack
fi
@ -194,17 +219,27 @@ trinity-base_src_unpack() {
trinity-base_src_prepare() {
debug-print-function ${FUNCNAME} "$@"
# # Only enable selected languages, used for KDE extragear apps.
# if [[ -n ${KDE_LINGUAS} ]]; then
# enable_selected_linguas
# fi
local dir lang
# SCM bootstrap--removed on the grounds that if you got this far,
# you have to be using git
# SCM bootstrap
if [[ ${BUILD_TYPE} = live ]]; then
case ${TRINITY_SCM} in
svn) subversion_src_prepare ;;
git) ;;
*) die "TRINITY_SCM: ${TRINITY_SCM} is not supported by ${FUNCNAME}"
esac
fi
# Apply patches
eapply_user
base_src_prepare
# Handle documentation and translations for extragear packages
# Handle documentation and translations for extragear packages
if [[ -n "$TRINITY_EXTRAGEAR_PACKAGING" ]]; then
# remove languages that have not been selected
# remove not selected languages
if [[ -n $TRINITY_LANGS ]]; then
einfo "Removing unselected translations from ${TEG_PO_DIR}"
for dir in $(find ${TEG_PO_DIR} -mindepth 1 -maxdepth 1 -type d ); do
@ -238,14 +273,12 @@ trinity-base_src_prepare() {
done
fi
fi
cmake-utils_src_prepare
}
# @FUNCTION: trinity-base_src_configure
# @DESCRIPTION:
# Call standard cmake-utils_src_onfigure and add some common arguments.
# Call standart cmake-utils_src_onfigure and add some common arguments.
trinity-base_src_configure() {
debug-print-function ${FUNCNAME} "$@"
local eg_cmakeargs
@ -269,12 +302,10 @@ trinity-base_src_configure() {
mycmakeargs=(
-DCMAKE_INSTALL_PREFIX="${EPREFIX}${TDEDIR}"
-DCMAKE_INSTALL_RPATH="${EPREFIX}${TDEDIR}"
$([[ "${TRINITY_NEED_ARTS}" == "optional" ]] && cmake-utils_use_with arts ARTS)
"${eg_cmakeargs[@]}"
"${mycmakeargs[@]}"
)
# $([[ "${TRINITY_NEED_ARTS}" == "optional" ]] && (cmake-utils_use_with arts ARTS))
cmake-utils_src_configure
}
@ -332,6 +363,15 @@ trinity-base_create_tmp_docfiles() {
done
done
# if [[ "${TRINITY_INSTALL_ROOT_DOCS}" == "yes" && " ${srcdirs} " == "* ./ *" ]]; then
# for doc in ${TRINITY_COMMON_DOCS}; do
# for docfile in $(ls ./"*${doc}*"); do
# targetdoc="${docfile//\//.}"
# targetdoc="${targetdoc#..}"
# cp "${docfile}" "$TMP_DOCDIR/${targetdoc}"
# done
# done
# fi
}
# @FUNCTION: trinity-base_install_docfiles
@ -353,48 +393,48 @@ trinity-base_install_docfiles() {
}
# @FUNCTION: trinity-base_fix_desktop_files
# @DESCRIPTION: OBSOLETE??????
# @DESCRIPTION:
# Perform desktop files modifications according to current version. You can pass
# either desktop files or direcories to the parametrs. In case you'd pass a
# directory the function will recursively search for all desktop files and
# modify them. If no argument specified the function assume to work on the ${D};
#trinity-base_fix_desktop_files() {
trinity-base_fix_desktop_files() {
# # Test if we have to perform any file fixing for current version
# case "3.5" in
# *${TRINITY_VER}*);;
# *) return 0 ;;
# esac
#
# local file_list dir_list f
#
# if [ "$#" != 0 ]; then
# # Get directories and files from arguments
# for f in $@; do
# if [ -f "$f" ]; then
# file_list+=" $f"
# elif [ -d "$f" ]; then
# dir_list+=" $f"
# else
# eerror "${FUNCNAME}: bad argument type: $(stat -c %F "$f")"
# fi
# done
# else
# dir_list="${D}"
# fi
#
# # Recursivly search for desktop files in directories
# for f in $dir_list; do
# file_list+="$(find ${f} -type f -name '*.desktop')"
# done
#
# # Performe the updates
# case "${TRINITY_VER}" in
# 3.5)
# for f in $file_list; do
# sed -i '/^OnlyShowIn=/s/KDE/TDE/g' "$f"
# done;;
# esac
#}
# Test if we have to perform any file fixing for current version
case "3.5" in
*${TRINITY_VER}*);;
*) return 0 ;;
esac
local file_list dir_list f
if [ "$#" != 0 ]; then
# Get directories and files from arguments
for f in $@; do
if [ -f "$f" ]; then
file_list+=" $f"
elif [ -d "$f" ]; then
dir_list+=" $f"
else
eerror "${FUNCNAME}: bad argument type: $(stat -c %F "$f")"
fi
done
else
dir_list="${D}"
fi
# Recursivly search for desktop files in directories
for f in $dir_list; do
file_list+="$(find ${f} -type f -name '*.desktop')"
done
# Performe the updates
case "${TRINITY_VER}" in
3.5)
for f in $file_list; do
sed -i '/^OnlyShowIn=/s/KDE/TDE/g' "$f"
done;;
esac
}
EXPORT_FUNCTIONS src_configure src_compile src_install src_prepare

@ -0,0 +1,185 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
#
# Original Author: Alexander Golubev (Fat-Zer)
# Purpose: basic trinity functions and variables
#
inherit multilib
TRINITY_LIVEVER="14.1.0"
# @FUNCTION: set-trinityver
# @USAGE: < version >
# @DESCRIPTION:
# Sets the right TRINITY_VER, TDEDIR etc...
# !!! unfinished
set-trinityver() {
debug-print-function $FUNCNAME "$@"
# set install location:
# - 3rd party apps go into /usr, and have SLOT="0".
# - kde-base category ebuilds go into /usr/trinity/$ETRINITY_VER,
# and have SLOT="$MAJORVER.$MINORVER".
# - This function exports $PREFIX (location to install to) and $TDEDIR
# (location of kdelibs to link against) for all ebuilds.
# get version elements
if [[ -n "$1" ]]; then
ETRINITY_VER="$1"
else
ETRINITY_VER="$PV"
fi
case "$ETRINITY_VER" in
9999 )
export TRINITY_VER="$(ver_cut 1 "$TRINITY_LIVEVER" )" ;;
* )
export TRINITY_VER="$(ver_cut 1 "$ETRINITY_VER" )" ;;
esac
export TDEDIR="/usr/trinity/${TRINITY_VER}"
export TDEDIRS="/usr/trinity/${TRINITY_VER}"
# this sould solve problems like "cannot find libraries", especially when
# compiling tdelibs
# NOTE: binaries which run during compilation and try to load shared
# libraries from the TDE directory (which may be broken) may still
# break compilation of tdelibs(?)
# TODO: fix that issue for tdelibs
adjust-trinity-paths
}
# @FUNCTION: get-trinity-libdirs
# @USAGE:
# @DESCRIPTION:
# lists all the trinity library directories
get-trinity-libdirs() {
local rv
for libdir in $(get_all_libdirs); do
echo " ${TDEDIR}/${libdir}"
done
}
# @FUNCTION: adjust-trinity-paths
# @USAGE: < version >
# @DESCRIPTION:
# Adjust PATH LDPATH and LD_LIBRARY_PATH to see only current trinity version
adjust-trinity-paths() {
debug-print-function $FUNCNAME "$@"
local libdir
# this function can be called during depend phase so we shouldn't use sed here
PATH="$(trinity_remove_path_component "$PATH" "/usr/trinity/*/bin")"
PATH="$(trinity_remove_path_component "$PATH" "/usr/trinity/*/sbin")"
PATH="$(trinity_prepand_path_component "$PATH" "${TDEDIR}/bin" )"
# FIXME: it seems we don't need LDPATH
# LDPATH="$(trinity_remove_path_component "$LDPATH" "/usr/trinity/*/${libdir}")"
LD_LIBRARY_PATH="$(trinity_remove_path_component "$LD_LIBRARY_PATH" "/usr/trinity/*/${libdir}")"
for libdir in $(get-trinity-libdirs); do
# LDPATH="$(trinity_prepand_path_component "$LDPATH" "${TDEDIR}/${libdir}" )"
LD_LIBRARY_PATH="$(trinity_prepand_path_component "$LD_LIBRARY_PATH" "${libdir}" )"
done
export PATH
export LD_LIBRARY_PATH
# Unset home paths so applications wouldn't try to write to root's dir while building
unset TDEHOME
unset TDEROOTHOME
}
trinity_remove_path_component() {
local i new_path path_array
IFS=: read -ra path_array <<< "$1"
for i in "${path_array[@]}"; do
case "$i" in
$2 ) ;; # delete specyfied entry
"" ) ;;
* ) new_path="${new_path}:${i}" ;;
esac
done
echo "${new_path#:}"
}
trinity_prepand_path_component() {
local new_path
new_path="${2%:}:${1#:}"
echo "${new_path%:}"
}
# @FUNCTION: need-trinity
# @USAGE: < version >
# @DESCRIPTION:
# Sets the correct DEPEND and RDEPEND for the needed trinity < version >.
need-trinity() {
debug-print-function $FUNCNAME "$@"
local my_depend
# determine install locations
set-trinityver $1
adjust-trinity-paths
my_depend=">=trinity-base/tdelibs-${ETRINITY_VER}:${TRINITY_VER}"
DEPEND="$DEPEND $my_depend"
RDEPEND="$RDEPEND $my_depend"
}
# @ECLASS-VARIABLE: TRINITY_NEED_ARTS
# @DESCRIPTION:
# This variable is set by the need-arts function. Possible arguments values 'yes', 'no' and 'optional'
# Default is 'no'
TRINITY_NEED_ARTS="no"
# @FUNCTION: need-arts
# @USAGE: need-arts <yes|optional>
# @DESCRIPTION:
# This function adds DEPENDs for aRTs support. Possible arguments are 'yes' and 'optinal'
# '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
# those variables don't forget to include the priviously setted value into them.
need-arts() {
debug-print-function $FUNCNAME "$@"
local tdelibs my_depend
[[ -z "${1}" ]] && die "$FUNCNAME requires an argument"
TRINITY_NEED_ARTS=$1;
case "${TRINITY_VER}" in
"") die "You must call set-trinityver functions to set TRINITY_VER before calling $FUNCNAME.";;
*) tdelibs="trinity-base/tdelibs";;
esac
# handle trinity-base/tdelibs in special way
if [[ "${CATEGORY}/${PN}" == "${tdelibs}" ]]; then
if [[ "$1" == optional ]]; then
my_depend=" arts? ( trinity-base/arts )"
IUSE+=" arts"
else
die "aRTs support for ${tdelibs} supposed to be optional"
fi
else
case "$1" in
yes) my_depend=" trinity-base/arts
${tdelibs}[arts]" ;;
optional) my_depend=" arts? ( trinity-base/arts
${tdelibs}[arts] )"
IUSE+=" arts" ;;
*) die "bad parameter: $1"
esac
fi
DEPEND+=" ${my_depend}";
RDEPEND+=" ${my_depend}";
}

@ -7,9 +7,9 @@
# Purpose: basic trinity functions and variables
#
inherit multilib
inherit versionator multilib
TRINITY_LIVEVER="14.1.0"
TRINITY_LIVEVER="14.0.0"
# @FUNCTION: set-trinityver
# @USAGE: < version >
@ -21,10 +21,16 @@ set-trinityver() {
# set install location:
# - 3rd party apps go into /usr, and have SLOT="0".
# - kde-base category ebuilds go into /usr/trinity/$ETRINITY_VER,
# - kde-base category ebuilds go into /usr/kde/$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 $KDEDIR
# (location of kdelibs to link against) for all ebuilds.
#
# -- Overrides - deprecated but working for now: --
# - If $KDEPREFIX is defined (in the profile or env), it overrides everything
# and both base and 3rd party kde stuff goes in there.
# - If $KDELIBSDIR is defined, the kdelibs installed in that location will be
# used, even by kde-base packages.
# get version elements
if [[ -n "$1" ]]; then
@ -34,20 +40,28 @@ set-trinityver() {
fi
case "$ETRINITY_VER" in
3.* )
export TRINITY_VER="$(get_version_component_range 1-2 "${ETRINITY_VER}")" ;;
9999 )
export TRINITY_VER="$(ver_cut 1 "$TRINITY_LIVEVER" )" ;;
export TRINITY_VER="$(get_major_version "$TRINITY_LIVEVER" )" ;;
* )
export TRINITY_VER="$(ver_cut 1 "$ETRINITY_VER" )" ;;
export TRINITY_VER="$(get_major_version "$ETRINITY_VER" )" ;;
esac
export TDEDIR="/usr/trinity/${TRINITY_VER}"
export TDEDIRS="/usr/trinity/${TRINITY_VER}"
# this sould solve problems like "cannot find libraries", especially when
# compiling tdelibs
# NOTE: binaries which run during compilation and try to load shared
# libraries from the TDE directory (which may be broken) may still
# break compilation of tdelibs(?)
# 3.5.x still uses KDE* variables
if [ "${TRINITY_VER}" = "3.5" ]; then
export KDEDIR="$TDEDIR"
export KDEDIRS="$TDEDIRS"
fi
# this sould solve problems like "cannot find libraries" espessialy when
# compiling kdelibs
# NOTE: That can breaks compilation of tdelibs:
# binaries which runs during compilation are tring to load shared
# libraries from the TDE's directory wich may be broken.
# TODO: fix that issue for tdelibs
adjust-trinity-paths
}
@ -87,7 +101,7 @@ adjust-trinity-paths() {
export PATH
export LD_LIBRARY_PATH
# Unset home paths so applications wouldn't try to write to root's dir while building
# Unset home paths so aplications wouldn't try to write to root's dir while build
unset TDEHOME
unset TDEROOTHOME
}
@ -127,7 +141,12 @@ need-trinity() {
set-trinityver $1
adjust-trinity-paths
my_depend=">=trinity-base/tdelibs-${ETRINITY_VER}:${TRINITY_VER}"
case "$1" in
3.5*)
my_depend=">=trinity-base/kdelibs-${ETRINITY_VER}:3.5";;
*)
my_depend=">=trinity-base/tdelibs-${ETRINITY_VER}:${TRINITY_VER}";;
esac
DEPEND="$DEPEND $my_depend"
RDEPEND="$RDEPEND $my_depend"
@ -135,14 +154,14 @@ need-trinity() {
# @ECLASS-VARIABLE: TRINITY_NEED_ARTS
# @DESCRIPTION:
# This variable is set by the need-arts function. Possible arguments values 'yes', 'no' and 'optional'
# This variable is setted by need-arts function. Possible arguments values 'yes', 'no' and 'optional'
# Default is 'no'
TRINITY_NEED_ARTS="no"
# @FUNCTION: need-arts
# @USAGE: need-arts <yes|optional>
# @DESCRIPTION:
# This function adds DEPENDs for aRTs support. Possible arguments are 'yes' and 'optinal'
# This function adds DEPEND's for aRTs-support Possible arguments are 'yes' and 'optinal'
# '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
# those variables don't forget to include the priviously setted value into them.
@ -156,7 +175,8 @@ need-arts() {
TRINITY_NEED_ARTS=$1;
case "${TRINITY_VER}" in
"") die "You must call set-trinityver functions to set TRINITY_VER before calling $FUNCNAME.";;
"") die "You must call set-trinityver unctions to set TRINITY_VER before calling $FUNCNAME.";;
3.5*) tdelibs="trinity-base/kdelibs";;
*) tdelibs="trinity-base/tdelibs";;
esac

@ -0,0 +1,241 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
#
# Original Author: fat-zer
# Purpose: make easy to install trinity ebuilds.
#
inherit trinity-base-2 trinity-functions-2 cmake-utils
LICENSE="GPL-2 LGPL-2"
HOMEPAGE="http://www.trinitydesktop.org/"
# set slot, TDEDIR, TRINITY_VER and PREFIX
set-trinityver
[[ -z "$SLOT" ]] && SLOT="$TRINITY_VER"
# common dependencies
DEPEND="trinity-base/tdelibs:${SLOT}"
# @FUNCTION: trinity-meta-2_set_trinity_submodule
# @DESCRIPTION:
# sets the TRINITY_SUBMODULE variable to nth value obtained from ${PN}
# if it isn't set yet
trinity-meta-2_set_trinity_submodule() {
debug-print-function $FUNCNAME "$@"
if [[ -z "$TRINITY_SUBMODULE" ]]; then
TRINITY_SUBMODULE="${PN#${TRINITY_MODULE_NAME}-}"
fi
}
# @FUNCTION: trinity-meta-2_src_pkg_setup
# @DESCRIPTION:
# Default pkg_setup function. It sets the correct ${S}
# nessecary files.
trinity-meta-2_pkg_setup() {
debug-print-function ${FUNCNAME} "$@"
adjust-trinity-paths
trinity-meta-2_set_trinity_submodule
}
# @FUNCTION: trinity-meta-2_src_unpack
# @DESCRIPTION:
# Default source extract function. It tries to unpack only
# necessary files.
trinity-meta-2_src_unpack() {
debug-print-function ${FUNCNAME} "$@"
if [[ ${BUILD_TYPE} = live ]]; then
case "${TRINITY_SCM}" in
git)
git-2_src_unpack
;;
*) die "TRINITY_SCM: ${TRINITY_SCM} is not supported by ${FUNCNAME}" ;;
esac
fi
trinity-meta-2_src_extract
}
# @FUNCTION: trinity-meta-2_src_extract
# @DESCRIPTION:
# A function to extract the source for a split KDE ebuild.
# Also see KMMODULE, KMEXTRACT
trinity-meta-2_src_extract() {
debug-print-function ${FUNCNAME} "$@"
trinity-meta-2_create_extractlists
if [[ "${BUILD_TYPE}" = live ]]; then
einfo "Exporting parts of working copy to ${S}"
case "$TRINITY_SCM" in
git) # nothing we can do to prevent git from unpacking code
;;
*) die "TRINITY_SCM: ${TRINITY_SCM} is not supported by ${FUNCNAME}"
esac
else
local tarfile tarparams f extractlist
case $TRINITY_TARBALL in
*.gz)
tarparams=" --gzip"
;;
*.xz)
tarparams=" --xz"
;;
esac
# Full path to source tarball
tarfile="${DISTDIR}/${TRINITY_TARBALL}"
# Detect real toplevel dir from tarball name - it will be used upon extraction
topdir="${TRINITY_TARBALL%.tar.*}"
ebegin "Unpacking parts of ${TRINITY_TARBALL} to ${WORKDIR}"
for f in $TSM_EXTRACT_LIST; do
extractlist+=" ${topdir}/${f}"
done
tar -xpf "${tarfile}" ${tarparams} -C "${WORKDIR}" ${extractlist} 2> /dev/null \
|| echo "tar extract command failed at least partially - continuing anyway"
# Make sure $S points to right place
[[ "${WORKDIR}/${topdir}" != "${S}" ]] && S="${WORKDIR}/${topdir}"
fi
}
# @FUNCTION: trinity-meta-2_rsync_copy
# @DESCRIPTION:
# Copies files from svn or git repository to $S
trinity-meta-2_rsync_copy() {
debug-print-function ${FUNCNAME} "$@"
local rsync_options subdir targetdir wc_path escm
case "${TRINITY_SCM}" in
git) wc_path="${EGIT_STORE_DIR}/${EGIT_PROJECT}";;
*) die "TRINITY_SCM: ${TRINITY_SCM} is not supported by ${FUNCNAME}" ;;
esac
rsync_options="--group --links --owner --perms --quiet --exclude=.svn/ --exclude=.git/"
# Copy ${TRINITY_MODULE_NAME} non-recursively (toplevel files)
rsync ${rsync_options} "${wc_path}"/* "${S}" \
|| die "rsync: can't export toplevel files to '${S}'."
# Copy cmake directory
if [[ -d "${wc_path}/cmake" ]]; then
rsync --recursive ${rsync_options} "${wc_path}/cmake" "${S}" \
|| die "rsync: can't export cmake files to '${S}'."
fi
# Copy all subdirectories listed in $TSM_EXTRACT_LIST
for subdir in ${TSM_EXTRACT_LIST}; do
rsync --recursive ${rsync_options} "${wc_path}/${subdir}" \
"${S}/$(dirname subdir)" \
|| die "rsync: can't export object '${wc_path}/${subdir}' to '${S}'."
done
}
# @FUNCTION: trinity-meta_create_extractlists
# @DESCRIPTION:
# Create lists of files and subdirectories to extract.
# Also see descriptions of KMMODULE and KMEXTRACT
trinity-meta-2_create_extractlists() {
debug-print-function ${FUNCNAME} "$@"
local submod
# if $TSM_EXTRACT is not set assign it to dirs named in TRINITY_SUBMODULE
if [ -z "${TSM_EXTRACT}" ]; then
for submod in ${TRINITY_SUBMODULE}; do
TSM_EXTRACT="${TSM_EXTRACT} ${submod}/"
done
fi
# add package-specific files and directories
case "${TRINITY_MODULE_NAME}" in
tdebase) TSM_EXTRACT_LIST+=" kcontrol/" ;;
*) ;; # nothing special for other modules
esac
TSM_EXTRACT_LIST+=" ${TSM_EXTRACT} ${TSM_EXTRACT_ALSO} cmake/ CMakeLists.txt"
TSM_EXTRACT_LIST+=" config.h.cmake ConfigureChecks.cmake"
debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME}: TSM_EXTRACT_LIST=\"${TSM_EXTRACT_LIST}\""
}
# @FUNCTION: trinity-meta_src_prepare
# @DESCRIPTION:
# Default src prepare function. Currently it's only a stub.
trinity-meta-2_src_prepare() {
debug-print-function ${FUNCNAME} "$@"
local shared_patch_dir f f_name;
shared_patch_dir="${FILESDIR}/shared/${TRINITY_MODULE_NAME}-${PV}/patches/"
if [ -d "${shared_patch_dir}" ]; then
find "${shared_patch_dir}" -type f | while read f; do
f_name="$(basename "${f}")"
case "${f_name}" in
*.diff | *.patch ) epatch "${f}" ;;
*.gz ) cp "${f}" "${T}"
gunzip ${T}/${f_name}
epatch ${T}/${f_name%.gz}
;;
*.bz2 ) cp "${f}" "${T}"
bunzip2 ${T}/${f_name}
epatch ${T}/${f_name%.bz2}
;;
*) die "unknown patch type in the patch directory" ;;
esac
done;
fi
trinity-base-2_src_prepare
}
# @FUNCTION: trinity-meta-2_src_configure
# @DESCRIPTION:
# Default source configure function. It sets apropriate cmake args.
# Also see description of KMMODULE
trinity-meta-2_src_configure() {
debug-print-function ${FUNCNAME} "$@"
local item tsmargs mod
for item in $TRINITY_SUBMODULE; do
mod="${item^^}"
mod="${mod//-/_}"
tsmargs+=" -DBUILD_${mod}=ON"
done
mycmakeargs=(
"${mycmakeargs[@]}"
${tsmargs}
)
trinity-base-2_src_configure
}
# @FUNCTION: trinity-meta-2_src_compile
# @DESCRIPTION:
# Just call trinity-base_src_compile.
trinity-meta-2_src_compile() {
debug-print-function ${FUNCNAME} "$@"
trinity-base-2_src_compile
}
# @FUNCTION: trinity-meta-2_src_install
# @DESCRIPTION:
# Call default cmake install function. and install documentation.
trinity-meta-2_src_install() {
debug-print-function ${FUNCNAME} "$@"
TRINITY_BASE_NO_INSTALL_DOC="yes" trinity-base-2_src_install
trinity-base-2_create_tmp_docfiles $TSM_EXTRACT
trinity-base-2_install_docfiles
}
EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install src_unpack pkg_setup

@ -16,13 +16,17 @@ HOMEPAGE="http://www.trinitydesktop.org/"
set-trinityver
[[ -z "$SLOT" ]] && SLOT="$TRINITY_VER"
if [[ "$TRINITY_VER" == "3.5" ]]; then
# common dependencies
DEPEND="trinity-base/tdelibs:${SLOT}"
DEPEND="trinity-base/kdelibs:${SLOT}"
else
DEPEND="trinity-base/tdelibs:${SLOT}"
fi
# @FUNCTION: trinity-meta_set_trinity_submodule
# @DESCRIPTION:
# sets the TRINITY_SUBMODULE variable to nth value obtained from ${PN}
# if it isn't set yet
# sets the TRINITY_SUBMODULE variable to vth value aptained from ${PN}
# if it doesn't set yet
trinity-meta_set_trinity_submodule() {
debug-print-function $FUNCNAME "$@"
@ -45,12 +49,18 @@ trinity-meta_pkg_setup() {
# @FUNCTION: trinity-meta_src_unpack
# @DESCRIPTION:
# Default source extract function. It tries to unpack only
# necessary files.
# nessecary files.
trinity-meta_src_unpack() {
debug-print-function ${FUNCNAME} "$@"
if [[ ${BUILD_TYPE} = live ]]; then
case "${TRINITY_SCM}" in
svn)
mkdir -p "$S"
ESVN_RESTRICT="export" subversion_src_unpack
subversion_wc_info
subversion_bootstrap
;;
git)
git-2_src_unpack
;;
@ -72,7 +82,8 @@ trinity-meta_src_extract() {
if [[ "${BUILD_TYPE}" = live ]]; then
einfo "Exporting parts of working copy to ${S}"
case "$TRINITY_SCM" in
git) # nothing we can do to prevent git from unpacking code
svn) trinity-meta_rsync_copy ;;
git) # we nothing can do to prevent git from unpacking code
;;
*) die "TRINITY_SCM: ${TRINITY_SCM} is not supported by ${FUNCNAME}"
esac
@ -116,6 +127,7 @@ trinity-meta_rsync_copy() {
local rsync_options subdir targetdir wc_path escm
case "${TRINITY_SCM}" in
svn) wc_path="${ESVN_WC_PATH}";;
git) wc_path="${EGIT_STORE_DIR}/${EGIT_PROJECT}";;
*) die "TRINITY_SCM: ${TRINITY_SCM} is not supported by ${FUNCNAME}" ;;
esac
@ -155,8 +167,10 @@ trinity-meta_create_extractlists() {
# add package-specific files and directories
case "${TRINITY_MODULE_NAME}" in
kdebase) TSM_EXTRACT_LIST+=" kcontrol/ kdmlib/" ;;
tdebase) TSM_EXTRACT_LIST+=" kcontrol/" ;;
*) ;; # nothing special for other modules
*) ;; # nothing special for over modules
# *) die "TRINITY_MODULE_NAME ${TRINITY_MODULE_NAME} is not supported by function ${FUNCNAME}" ;;
esac
TSM_EXTRACT_LIST+=" ${TSM_EXTRACT} ${TSM_EXTRACT_ALSO} cmake/ CMakeLists.txt"
@ -191,6 +205,13 @@ trinity-meta_src_prepare() {
done;
fi
# fix bad cmake code fo 3.5.13.1
if [ $PV == "3.5.13.1" ]; then
[ -f "cmake/modules/FindTDE.cmake" ] && \
sed -ie 's!HINTS\s\+${\w*BIN\w*}!HINTS "${TDE_PREFIX}/bin" ${BIN_INSTALL_DIR}!' \
cmake/modules/FindTDE.cmake
fi
trinity-base_src_prepare
}

@ -4,7 +4,7 @@
EAPI="7"
TRINITY_MODULE_NAME="$PN"
inherit trinity-base multilib
inherit trinity-base-2 multilib
set-trinityver
@ -58,14 +58,12 @@ RDEPEND+=" ${MY_DEPEND}
src_configure() {
mycmakeargs=(
-DMALLOC_FULL=ON
-DTDE_MALLOC_FULL=ON
-DWITH_LIBIDN=ON
-DWITH_SSL=ON
-DWITH_LIBART=ON
-DWITH_PCRE=ON
-DWITH_XCURSOR=ON
-DWITH_HSPELL=OFF
-DKDE4_DEFAULT_HOME=.kde4
-DWITH_ARTS=OFF
-DWITH_ALSA="$(usex alsa)"
-DWITH_AVAHI="$(usex avahi)"
@ -89,11 +87,14 @@ src_configure() {
-DWITH_SUDO_TDESU_BACKEND="$(usex sudo)"
)
trinity-base_src_configure
# -DWITH_XCURSOR=ON
# -DKDE4_DEFAULT_HOME=.kde4
trinity-base-2_src_configure
}
src_install() {
trinity-base_src_install
trinity-base-2_src_install
dodir /etc/env.d
# KDE implies that the install path is listed first in TDEDIRS and the user
@ -125,8 +126,8 @@ cat <<EOF >"${D}/etc/revdep-rebuild/50-trinity-${SLOT}"
SEARCH_DIRS="${TDEDIR}/bin ${TDEDIR}/lib*"
EOF
trinity-base_create_tmp_docfiles
trinity-base_install_docfiles
trinity-base-2_create_tmp_docfiles
trinity-base-2_install_docfiles
}
pkg_postinst () {

Loading…
Cancel
Save