* [gentoo-commits] proj/perl-overlay:perl514 commit in: eclass/
@ 2011-04-24 21:15 Kent Fredric
2011-04-24 21:15 ` [gentoo-commits] proj/perl-overlay:perl514virtuals " Kent Fredric
0 siblings, 1 reply; 2+ messages in thread
From: Kent Fredric @ 2011-04-24 21:15 UTC (permalink / raw
To: gentoo-commits
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] proj/perl-overlay:perl514virtuals commit in: eclass/
2011-04-24 21:15 [gentoo-commits] proj/perl-overlay:perl514 commit in: eclass/ Kent Fredric
@ 2011-04-24 21:15 ` Kent Fredric
0 siblings, 0 replies; 2+ messages in thread
From: Kent Fredric @ 2011-04-24 21:15 UTC (permalink / raw
To: gentoo-commits
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-04-24 21:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-24 21:15 [gentoo-commits] proj/perl-overlay:perl514 commit in: eclass/ Kent Fredric
2011-04-24 21:15 ` [gentoo-commits] proj/perl-overlay:perl514virtuals " Kent Fredric
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox