From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SWcEw-00081N-TU for garchives@archives.gentoo.org; Mon, 21 May 2012 23:42:15 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F2453E0C5F; Mon, 21 May 2012 23:42:06 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id AC18FE0C5F for ; Mon, 21 May 2012 23:42:06 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B61771B400C for ; Mon, 21 May 2012 23:42:05 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 76E8AE542A for ; Mon, 21 May 2012 23:42:04 +0000 (UTC) From: "Davide Pesavento" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Davide Pesavento" Message-ID: <1337642858.ef2109df4cd719ce0d14760b5df18a825772d71f.pesa@gentoo> Subject: [gentoo-commits] proj/qt:master commit in: eclass/ X-VCS-Repository: proj/qt X-VCS-Files: eclass/qt4-r2.eclass X-VCS-Directories: eclass/ X-VCS-Committer: pesa X-VCS-Committer-Name: Davide Pesavento X-VCS-Revision: ef2109df4cd719ce0d14760b5df18a825772d71f X-VCS-Branch: master Date: Mon, 21 May 2012 23:42:04 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: e16524f6-5d09-4b7e-8823-d484ad723d88 X-Archives-Hash: 32163ec9d86218593ec4fd0b27a15800 commit: ef2109df4cd719ce0d14760b5df18a825772d71f Author: Davide Pesavento gmail com> AuthorDate: Mon May 21 23:27:38 2012 +0000 Commit: Davide Pesavento gentoo org> CommitDate: Mon May 21 23:27:38 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/qt.git;a=3Dco= mmit;h=3Def2109df [qt4-r2.eclass] Improvements to qt4-r2_src_install(). Allow DOCS to be an array variable, add support for HTML_DOCS. The implementation is mostly copied from cmake-utils and base eclasses. Remove support for DOCSDIR (used by only 2 ebuilds in the tree). Improve variables documentation. --- eclass/qt4-r2.eclass | 83 +++++++++++++++++++++++++++-----------------= ----- 1 files changed, 46 insertions(+), 37 deletions(-) diff --git a/eclass/qt4-r2.eclass b/eclass/qt4-r2.eclass index c8b007d..362ceaf 100644 --- a/eclass/qt4-r2.eclass +++ b/eclass/qt4-r2.eclass @@ -19,16 +19,30 @@ inherit base eutils multilib toolchain-funcs =20 export XDG_CONFIG_HOME=3D"${T}" =20 +# @ECLASS-VARIABLE: DOCS +# @DEFAULT_UNSET +# @DESCRIPTION: +# Array containing documents passed to dodoc command. +# Paths can be absolute or relative to ${S}. +# +# Example: DOCS=3D( ChangeLog README "${WORKDIR}/doc_folder/" ) + +# @ECLASS-VARIABLE: HTML_DOCS +# @DEFAULT_UNSET +# @DESCRIPTION: +# Array containing documents passed to dohtml command. +# Paths can be absolute or relative to ${S}. +# +# Example: HTML_DOCS=3D( "doc/document.html" "${WORKDIR}/html_folder/" ) + # @ECLASS-VARIABLE: LANGS # @DEFAULT_UNSET # @DESCRIPTION: # In case your Qt4 application provides various translations, use this v= ariable # to specify them in order to populate "linguas_*" IUSE automatically. M= ake sure # that you set this variable before inheriting qt4-r2 eclass. -# Example: -# @CODE -# LANGS=3D"en el de" -# @CODE +# +# Example: LANGS=3D"de el it ja" for x in ${LANGS}; do IUSE+=3D" linguas_${x}" done @@ -36,14 +50,31 @@ done # @ECLASS-VARIABLE: LANGSLONG # @DEFAULT_UNSET # @DESCRIPTION: -# Same as above, but this variable is for LINGUAS that must be in long f= ormat. +# Same as LANGS, but this variable is for LINGUAS that must be in long f= ormat. # Remember to set this variable before inheriting qt4-r2 eclass. # Look at ${PORTDIR}/profiles/desc/linguas.desc for details. +# +# Example: LANGSLONG=3D"en_GB ru_RU" for x in ${LANGSLONG}; do IUSE+=3D" linguas_${x%_*}" done unset x =20 +# @ECLASS-VARIABLE: PATCHES +# @DEFAULT_UNSET +# @DESCRIPTION: +# Array variable containing all the patches to be applied. This variable +# is expected to be defined in the global scope of ebuilds. Make sure to +# specify the full path. This variable is used in src_prepare phase. +# +# Example: +# @CODE +# PATCHES=3D( +# "${FILESDIR}/mypatch.patch" +# "${FILESDIR}/patches_folder/" +# ) +# @CODE + # @FUNCTION: qt4-r2_src_unpack # @DESCRIPTION: # Default src_unpack function for packages that depend on qt4. If you ha= ve to @@ -64,17 +95,6 @@ qt4-r2_src_unpack() { base_src_unpack "$@" } =20 -# @ECLASS-VARIABLE: PATCHES -# @DEFAULT_UNSET -# @DESCRIPTION: -# In case you have patches to apply, specify them here. Make sure to -# specify the full path. This variable is used in src_prepare phase. -# Example: -# @CODE -# PATCHES=3D( "${FILESDIR}"/mypatch.patch -# "${FILESDIR}"/mypatch2.patch ) -# @CODE - # @FUNCTION: qt4-r2_src_prepare # @DESCRIPTION: # Default src_prepare function for packages that depend on qt4. If you h= ave to @@ -113,34 +133,23 @@ qt4-r2_src_compile() { base_src_compile "$@" } =20 -# @ECLASS-VARIABLE: DOCS -# @DEFAULT_UNSET -# @DESCRIPTION: -# Use this variable if you want to install any documentation. -# Example: -# @CODE -# DOCS=3D"README AUTHORS" -# @CODE - -# @ECLASS-VARIABLE: DOCSDIR -# @DESCRIPTION: -# Directory containing documentation, defaults to ${S}. - # @FUNCTION: qt4-r2_src_install # @DESCRIPTION: # Default src_install function for qt4-based packages. Installs compiled= code, -# documentation (via DOCS variable) and translations (via LANGS and -# LANGSLONG variables). +# documentation (via DOCS and HTML_DOCS variables) and translations (via= LANGS +# and LANGSLONG variables). qt4-r2_src_install() { debug-print-function $FUNCNAME "$@" =20 - emake INSTALL_ROOT=3D"${D}" DESTDIR=3D"${D}" install || die "emake inst= all failed" + base_src_install INSTALL_ROOT=3D"${D}" "$@" =20 - # install documentation - local doc=3D dir=3D${DOCSDIR:-${S}} - for doc in ${DOCS}; do - dodoc "${dir}/${doc}" || die "dodoc failed" - done + # backward compatibility for non-array variables + if [[ -n ${DOCS} ]] && [[ "$(declare -p DOCS 2>/dev/null 2>&1)" !=3D "d= eclare -a"* ]]; then + dodoc ${DOCS} || die "dodoc failed" + fi + if [[ -n ${HTML_DOCS} ]] && [[ "$(declare -p HTML_DOCS 2>/dev/null 2>&1= )" !=3D "declare -a"* ]]; then + dohtml -r ${HTML_DOCS} || die "dohtml failed" + fi =20 # install translations # need to have specified LANGS or LANGSLONG for this to work