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 1QDup4-0000yG-5N for garchives@archives.gentoo.org; Sun, 24 Apr 2011 08:37:42 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D18761C069; Sun, 24 Apr 2011 08:37:34 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id A50291C069 for ; Sun, 24 Apr 2011 08:37:34 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1FDBC1B4017 for ; Sun, 24 Apr 2011 08:37:34 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 31920803E3 for ; Sun, 24 Apr 2011 08:37:33 +0000 (UTC) From: "Torsten Veller" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Torsten Veller" Message-ID: Subject: [gentoo-commits] proj/perl-overlay:master commit in: eclass/ X-VCS-Repository: proj/perl-overlay X-VCS-Files: eclass/perl-virtual.eclass X-VCS-Directories: eclass/ X-VCS-Committer: tove X-VCS-Committer-Name: Torsten Veller X-VCS-Revision: e22558827558eb65687996f18e629e38c88f7be4 Date: Sun, 24 Apr 2011 08:37:33 +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: X-Archives-Hash: f3d47b23abbdd59d1f20dd00c73ce01d commit: e22558827558eb65687996f18e629e38c88f7be4 Author: Torsten Veller gentoo org> AuthorDate: Sun Apr 24 07:55:06 2011 +0000 Commit: Torsten Veller gentoo org> CommitDate: Sun Apr 24 08:20:12 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/perl-overlay.= git;a=3Dcommit;h=3De2255882 Add perl-virtual.eclass --- eclass/perl-virtual.eclass | 46 ++++++++++++++++++++++++++++++++++++++= ++++++ 1 files changed, 46 insertions(+), 0 deletions(-) diff --git a/eclass/perl-virtual.eclass b/eclass/perl-virtual.eclass new file mode 100644 index 0000000..9d7e69a --- /dev/null +++ b/eclass/perl-virtual.eclass @@ -0,0 +1,46 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +# @ECLASS: perl-virtual.eclass +# @MAINTAINER: +# perl@gentoo.org +# @BLURB: Set up virtuals for perl modules more easily +# @DESCRIPTION: +# The perl-virtual.eclass sets all possible ebuild variables. It uses th= e +# PM_PROVIDER array to set the any-of-many runtime dependencies. +# @EXAMPLE: +# An ebuild might look like this: +# +# @CODE +# +# PM_PROVIDER+=3D( "~dev-lang/perl-5.12.3" ) +# PM_PROVIDER+=3D( "5.10.1" ) +# inherit perl-virtual +# KEYWORDS=3D"~amd64 ~x86" +# IUSE=3D"" +# +# @CODE + +# @ECLASS-VARIABLE: PM_PROVIDER +# @DEFAULT_UNSET +# @DESCRIPTION: +# The array should list the providers to be added to RDEPEND +# with preference from highest to lowest. +# If an element starts with "5", it is considered a ~dev-lang/perl versi= on. +# If PM_PROVIDER is not defined, RDEPEND isn't set. +# ~perl-core/${PN#perl-}-${PV} is added at the end automatically. + +DESCRIPTION=3D"Virtual for ${PN#perl-}" +HOMEPAGE=3D"" +SRC_URI=3D"" + +LICENSE=3D"" +SLOT=3D"0" +IUSE=3D"" + +if [[ $(declare -p PM_PROVIDER 2>&-) !=3D "declare -a PM_PROVIDER=3D"* ]= ] ; then + RDEPEND=3D"~perl-core/${PN#perl-}-${PV}" +elif [[ ${#PM_PROVIDER[*]} -gt 0 ]] ; then + RDEPEND=3D"|| ( ${PM_PROVIDER[@]/#5/~dev-lang/perl-5} ~perl-core/${PN#p= erl-}-${PV} )" +fi