From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 5B6B859CB1 for ; Mon, 11 Apr 2016 21:49:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 84299E085B; Mon, 11 Apr 2016 21:48:57 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 138B4E085B for ; Mon, 11 Apr 2016 21:48:57 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BE7C1340BB9 for ; Mon, 11 Apr 2016 21:48:55 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3C1C320E for ; Mon, 11 Apr 2016 21:48:52 +0000 (UTC) From: "Andreas Hüttel" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Hüttel" Message-ID: <1460411322.872519317ecee8bb04b9b6c93caa5b288df9c3d7.dilfridge@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/perl-module.eclass X-VCS-Directories: eclass/ X-VCS-Committer: dilfridge X-VCS-Committer-Name: Andreas Hüttel X-VCS-Revision: 872519317ecee8bb04b9b6c93caa5b288df9c3d7 X-VCS-Branch: master Date: Mon, 11 Apr 2016 21:48:52 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 13a3fa9d-f54e-48dd-98e6-9da590eea5d7 X-Archives-Hash: 48612d39c35f65526b96bd8236009ea4 commit: 872519317ecee8bb04b9b6c93caa5b288df9c3d7 Author: Andreas K. Hüttel gentoo org> AuthorDate: Mon Apr 11 21:44:55 2016 +0000 Commit: Andreas Hüttel gentoo org> CommitDate: Mon Apr 11 21:48:42 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87251931 perl-module.eclass: Add new control variable DIST_EXAMPLES eclass/perl-module.eclass | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass index 8b2f3a4..c22b685 100644 --- a/eclass/perl-module.eclass +++ b/eclass/perl-module.eclass @@ -131,6 +131,14 @@ LICENSE="${LICENSE:-|| ( Artistic GPL-1+ )}" # (EAPI=6) This variable sets the module author name for the calculation of # SRC_URI. Named MODULE_AUTHOR in EAPI=5. +# @ECLASS-VARIABLE: DIST_EXAMPLES +# @DESCRIPTION: +# (EAPI=6) This Bash array allows passing a list of example files to be installed +# in /usr/share/doc/${PF}/examples. If set before inherit, automatically adds +# a use-flag examples, if not you'll have to add the useflag in your ebuild. +# Examples are installed only if the useflag examples exists and is activated. + + if [[ ${EAPI:-0} == 5 ]]; then if [[ -n ${MY_PN} || -n ${MY_PV} || -n ${MODULE_VERSION} ]] ; then : ${MY_P:=${MY_PN:-${PN}}-${MY_PV:-${MODULE_VERSION:-${PV}}}} @@ -158,6 +166,8 @@ else SRC_URI="mirror://cpan/authors/id/${DIST_AUTHOR:0:1}/${DIST_AUTHOR:0:2}/${DIST_AUTHOR}/${DIST_SECTION:+${DIST_SECTION}/}${DIST_A}" [[ -z "${HOMEPAGE}" ]] && \ HOMEPAGE="http://search.cpan.org/dist/${DIST_NAME}/" + + [[ -z "${DIST_EXAMPLES}" ]] || IUSE+=" examples" fi SRC_PREP="no" @@ -419,6 +429,12 @@ perl-module_src_install() { [[ -s ${f} ]] && dodoc ${f} done + if [[ ${EAPI:-0} != 5 ]] ; then + if in_iuse examples && use examples ; then + [[ -z "${DIST_EXAMPLES}" ]] || perl_doexamples ${DIST_EXAMPLES} + fi + fi + perl_link_duallife_scripts }