From: "Kent Fredric" <kentfredric@gmail.com> To: gentoo-commits@lists.gentoo.org Subject: [gentoo-commits] proj/perl-overlay:perl514 commit in: eclass/ Date: Sun, 24 Apr 2011 21:15:10 +0000 (UTC) [thread overview] Message-ID: <e22558827558eb65687996f18e629e38c88f7be4.kent@gentoo> (raw) commit: e22558827558eb65687996f18e629e38c88f7be4 Author: Torsten Veller <tove <AT> gentoo <DOT> org> AuthorDate: Sun Apr 24 07:55:06 2011 +0000 Commit: Kent Fredric <kentfredric <AT> gmail <DOT> com> CommitDate: Sun Apr 24 08:20:12 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/perl-overlay.git;a=commit;h=e2255882 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 the +# PM_PROVIDER array to set the any-of-many runtime dependencies. +# @EXAMPLE: +# An ebuild might look like this: +# +# @CODE +# +# PM_PROVIDER+=( "~dev-lang/perl-5.12.3" ) +# PM_PROVIDER+=( "5.10.1" ) +# inherit perl-virtual +# KEYWORDS="~amd64 ~x86" +# IUSE="" +# +# @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 version. +# If PM_PROVIDER is not defined, RDEPEND isn't set. +# ~perl-core/${PN#perl-}-${PV} is added at the end automatically. + +DESCRIPTION="Virtual for ${PN#perl-}" +HOMEPAGE="" +SRC_URI="" + +LICENSE="" +SLOT="0" +IUSE="" + +if [[ $(declare -p PM_PROVIDER 2>&-) != "declare -a PM_PROVIDER="* ]] ; then + RDEPEND="~perl-core/${PN#perl-}-${PV}" +elif [[ ${#PM_PROVIDER[*]} -gt 0 ]] ; then + RDEPEND="|| ( ${PM_PROVIDER[@]/#5/~dev-lang/perl-5} ~perl-core/${PN#perl-}-${PV} )" +fi
WARNING: multiple messages have this Message-ID (diff)
From: "Kent Fredric" <kentfredric@gmail.com> To: gentoo-commits@lists.gentoo.org Subject: [gentoo-commits] proj/perl-overlay:perl514virtuals commit in: eclass/ Date: Sun, 24 Apr 2011 21:15:16 +0000 (UTC) [thread overview] Message-ID: <e22558827558eb65687996f18e629e38c88f7be4.kent@gentoo> (raw) Message-ID: <20110424211516.2mLHn-jP0rOzaDdMBPsDtk8PInBcczis6fj5NHw3sXw@z> (raw) commit: e22558827558eb65687996f18e629e38c88f7be4 Author: Torsten Veller <tove <AT> gentoo <DOT> org> AuthorDate: Sun Apr 24 07:55:06 2011 +0000 Commit: Kent Fredric <kentfredric <AT> gmail <DOT> com> CommitDate: Sun Apr 24 08:20:12 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/perl-overlay.git;a=commit;h=e2255882 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 the +# PM_PROVIDER array to set the any-of-many runtime dependencies. +# @EXAMPLE: +# An ebuild might look like this: +# +# @CODE +# +# PM_PROVIDER+=( "~dev-lang/perl-5.12.3" ) +# PM_PROVIDER+=( "5.10.1" ) +# inherit perl-virtual +# KEYWORDS="~amd64 ~x86" +# IUSE="" +# +# @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 version. +# If PM_PROVIDER is not defined, RDEPEND isn't set. +# ~perl-core/${PN#perl-}-${PV} is added at the end automatically. + +DESCRIPTION="Virtual for ${PN#perl-}" +HOMEPAGE="" +SRC_URI="" + +LICENSE="" +SLOT="0" +IUSE="" + +if [[ $(declare -p PM_PROVIDER 2>&-) != "declare -a PM_PROVIDER="* ]] ; then + RDEPEND="~perl-core/${PN#perl-}-${PV}" +elif [[ ${#PM_PROVIDER[*]} -gt 0 ]] ; then + RDEPEND="|| ( ${PM_PROVIDER[@]/#5/~dev-lang/perl-5} ~perl-core/${PN#perl-}-${PV} )" +fi
next reply other threads:[~2011-04-24 21:16 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-04-24 21:15 Kent Fredric [this message] 2011-04-24 21:15 ` [gentoo-commits] proj/perl-overlay:perl514virtuals commit in: eclass/ Kent Fredric
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=e22558827558eb65687996f18e629e38c88f7be4.kent@gentoo \ --to=kentfredric@gmail.com \ --cc=gentoo-commits@lists.gentoo.org \ --cc=gentoo-dev@lists.gentoo.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox