summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2007-10-17 07:49:15 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2007-10-17 07:49:15 +0000
commit73ce1343c8f376315b070ba45686af790511b47c (patch)
tree7cc380f85b3f4087934a24c86150b38fd24b29f5 /eclass/perl-module.eclass
parentadapt deps for texlive, bug #195895 (diff)
downloadgentoo-2-73ce1343c8f376315b070ba45686af790511b47c.tar.gz
gentoo-2-73ce1343c8f376315b070ba45686af790511b47c.tar.bz2
gentoo-2-73ce1343c8f376315b070ba45686af790511b47c.zip
Add the MODULE_AUTHOR variable with documentation, to simplify CPAN ebuilds.
Diffstat (limited to 'eclass/perl-module.eclass')
-rw-r--r--eclass/perl-module.eclass18
1 files changed, 13 insertions, 5 deletions
diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
index 4a22010885c2..c54e964e19cf 100644
--- a/eclass/perl-module.eclass
+++ b/eclass/perl-module.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.108 2007/08/20 08:21:58 ian Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.109 2007/10/17 07:49:15 robbat2 Exp $
#
# Author: Seemant Kulleen <seemant@gentoo.org>
# Maintained by the Perl herd <perl@gentoo.org>
@@ -12,9 +12,6 @@ inherit base
EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst pkg_prerm pkg_postrm src_compile src_install src_test src_unpack
-# 2007.08.19 ian
-# Added ${myconf} - bug #176818
-#
# 2005.04.28 mcummings
# Mounting problems with src_test functions has forced me to make the
# compilation of perl modules honor the FEATURES maketest flag rather than what
@@ -83,7 +80,18 @@ EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst pkg_prerm pkg_postrm src_com
# overriding, use it; otherwise use the Makefile.PL; otherwise return (maybe we
# want all the functionality of the perl-module eclass without needing to
# compile??).
-
+#
+# 2007.08.19 ian
+# Added ${myconf} - bug #176818
+#
+# 2007.10.17 robbat2
+# Added the 'MODULE_AUTHOR' variable. Set it before inheriting the eclass
+# and it will set your HOMEPAGE and SRC_URI correctly for a CPAN package.
+
+if [ -z "${HOMEPAGE}" -a -z "${SRC_URI}" -a -n "${MODULE_AUTHOR}" ]; then
+ HOMEPAGE="http://search.cpan.org/~${MODULE_AUTHOR}/"
+ SRC_URI="mirror://cpan/authors/id/${MODULE_AUTHOR:0:1}/${MODULE_AUTHOR:0:2}/${MODULE_AUTHOR}/${P}.tar.gz"
+fi
SRC_PREP="no"
SRC_TEST="skip"