summaryrefslogtreecommitdiff
path: root/eclass
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
commit389b6fb56c63bba6724453e4b8675fa47aa47680 (patch)
tree3f81b8e5b2b528956f79369070cb92b8d998f8a0 /eclass
parentstable ppc64, bug 208929 (diff)
downloadhistorical-389b6fb56c63bba6724453e4b8675fa47aa47680.tar.gz
historical-389b6fb56c63bba6724453e4b8675fa47aa47680.tar.bz2
historical-389b6fb56c63bba6724453e4b8675fa47aa47680.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')
-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"