diff options
Diffstat (limited to 'eclass/trinity-base.eclass')
-rw-r--r-- | eclass/trinity-base.eclass | 196 |
1 files changed, 78 insertions, 118 deletions
diff --git a/eclass/trinity-base.eclass b/eclass/trinity-base.eclass index ff116ba9..b4e4b2a4 100644 --- a/eclass/trinity-base.eclass +++ b/eclass/trinity-base.eclass @@ -4,28 +4,25 @@ # # Original Author: fat-zer -# Purpose: support planty of ebuilds for trinity project (a kde3 fork). +# Purpose: support ebuilds for the trinity project (a kde3 fork). # RESTRICT=network-sandbox -inherit trinity-functions cmake-utils base +inherit trinity-functions cmake-utils -# 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, 1 and 2 +# ban EAPI 0-6 case $EAPI in - 0|1|2|3|4) die "EAPI=${EAPI} is not supported" ;; - 5) ;; + 0|1|2|3|4|5|6) die "EAPI=${EAPI} is not supported" ;; + 7) ;; *) die "Unknown EAPI=${EAPI}" esac # @ECLASS-VARIABLE: BUILD_TYPE # @DESCRIPTION: -# Determins he build type: live or release +# Determines the build type: live or release if [[ ${PV} = *9999* ]]; then BUILD_TYPE="live" else @@ -41,8 +38,7 @@ echo "${TRINITY_MODULE_NAME:=${PN}}" >/dev/null # @ECLASS-VARIABLE: TRINITY_SCM # @DESCRIPTION: -# Determins from what version control system code is chiking out for live -# ebuilds. +# Determines which version control system code is checking out live ebuilds from. # @ECLASS-VARIABLE: TMP_DOCDIR # @DESCRIPTION: @@ -50,8 +46,8 @@ echo "${TRINITY_MODULE_NAME:=${PN}}" >/dev/null # # @ECLASS-VARIABLE: TRINTY_BASE_NO_INSTALL_DOC # @DESCRIPTION: -# if setted to anything except "no" this variable prevents -# trinity-base_src_install() to install documentation +# if set to anything except "no" this variable prevents +# trinity-base_src_install() from installing documentation # # @ECLASS-VARIABLE: TRINTY_LANGS @@ -59,8 +55,7 @@ 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(). kde4-{base,meta}.eclass does -# this for you. +# translations, ebuilds must call enable_selected_linguas(). # @ECLASS-VARIABLE: TRINTY_DOC_LANGS # @DESCRIPTION: @@ -75,7 +70,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'. -# As well It ensures buildtime and runtime dependencies. +# Also ensures buildtime and runtime dependencies are met. TRINITY_HANDBOOK="${TRINITY_HANDBOOK:-never}" # @ECLASS-VARIABLE: TRINITY_EXTRAGEAR_PACKAGING @@ -87,8 +82,8 @@ TRINITY_HANDBOOK="${TRINITY_HANDBOOK:-never}" # @ECLASS-VARIABLE: TRINITY_GIT_MIRROR # @DESCRIPTION: -# User (or ebuild) can decide another git mirror if it's needed; -# Defaults to http://scm.trinitydesktop.org/scm/git +# 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: @@ -96,7 +91,7 @@ TRINITY_HANDBOOK="${TRINITY_HANDBOOK:-never}" # @ECLASS-VARIABLE: TRINITY_COMMON_DOCS # @DESCRIPTION: -# Common doc names that was found in trinity project's dirs. +# 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 @@ -110,8 +105,7 @@ 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://trinity.blackmag.net/releases" # the old one +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 @@ -119,40 +113,27 @@ if [[ ${BUILD_TYPE} = live ]]; then [[ -z "$TRINITY_SCM" ]] && TRINITY_SCM=git case ${TRINITY_SCM} in - git) inherit git-2 ;; + git) inherit git-r3 ;; *) die "Unsupported TRINITY_SCM=${TRINITY_SCM}" ;; esac - #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}" + #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}}" - - 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 + + #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}/${mod_ver}/${TRINITY_MODULE_TYPE}/$TRINITY_TARBALL" + SRC_URI="${TRINITY_BASE_SRC_URI}/R${mod_ver}/main/${TRINITY_MODULE_TYPE}/$TRINITY_TARBALL" else - SRC_URI="${TRINITY_BASE_SRC_URI}/${mod_ver}/$TRINITY_TARBALL" + SRC_URI="${TRINITY_BASE_SRC_URI}/R${mod_ver}/main/$TRINITY_TARBALL" fi S="${WORKDIR}/${full_mod_name}" @@ -197,16 +178,10 @@ fi # @FUNCTION: trinity-base_src_unpack # @DESCRIPTION: -# A default src unpack function to be call git-2_src_unpack either +# A default src unpack function to be call git-v3_src_unpack either trinity-base_src_unpack() { 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 + git-v3_src_unpack else base_src_unpack fi @@ -219,27 +194,17 @@ 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 - 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 + # SCM bootstrap--removed on the grounds that if you got this far, + # you have to be using git # Apply patches - base_src_prepare + eapply_user - # Handle documentation and translations for extragear packages + # Handle documentation and translations for extragear packages if [[ -n "$TRINITY_EXTRAGEAR_PACKAGING" ]]; then - # remove not selected languages + # 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 @@ -273,12 +238,14 @@ trinity-base_src_prepare() { done fi fi + + cmake-utils_src_prepare } # @FUNCTION: trinity-base_src_configure # @DESCRIPTION: -# Call standart cmake-utils_src_onfigure and add some common arguments. +# Call standard cmake-utils_src_onfigure and add some common arguments. trinity-base_src_configure() { debug-print-function ${FUNCNAME} "$@" local eg_cmakeargs @@ -302,10 +269,12 @@ 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 } @@ -363,15 +332,6 @@ 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 @@ -393,48 +353,48 @@ trinity-base_install_docfiles() { } # @FUNCTION: trinity-base_fix_desktop_files -# @DESCRIPTION: +# @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 +#trinity-base_fix_desktop_files() { - 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 |