summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2008-02-06 02:39:04 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2008-02-06 02:39:04 +0000
commitb83795468b4edf97fb04771acafb5bbfb1c0e0e5 (patch)
treed63b2f85f03103544c5e9aa03a9dd72486410b06 /eclass/perl-module.eclass
parentstable ppc64, bug 208929 (diff)
downloadgentoo-2-b83795468b4edf97fb04771acafb5bbfb1c0e0e5.tar.gz
gentoo-2-b83795468b4edf97fb04771acafb5bbfb1c0e0e5.tar.bz2
gentoo-2-b83795468b4edf97fb04771acafb5bbfb1c0e0e5.zip
Improve the automatic HOMEPAGE/SRC_URI code that is powered by MODULE_AUTHOR. New variable MODULE_SECTION for some prolific authors, and also use the CPAN search as the homepage rather than the MODULE_AUTHOR page.
Diffstat (limited to 'eclass/perl-module.eclass')
-rw-r--r--eclass/perl-module.eclass9
1 files changed, 4 insertions, 5 deletions
diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
index 4a6eaa2777fb..c698132bede1 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.110 2007/10/17 08:01:12 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.111 2008/02/06 02:39:04 robbat2 Exp $
#
# Author: Seemant Kulleen <seemant@gentoo.org>
# Maintained by the Perl herd <perl@gentoo.org>
@@ -88,10 +88,9 @@ EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst pkg_prerm pkg_postrm src_com
# 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
+[ -z "${SRC_URI}" -a -n "${MODULE_AUTHOR}" ] && \
+ SRC_URI="mirror://cpan/authors/id/${MODULE_AUTHOR:0:1}/${MODULE_AUTHOR:0:2}/${MODULE_AUTHOR}/${MODULE_SECTION}/${P}.tar.gz"
+[ -z "${HOMEPAGE}" ] && HOMEPAGE="http://search.cpan.org/search?query=${PN}&mode=dist"
SRC_PREP="no"
SRC_TEST="skip"