Magellan Linux

Annotation of /branches/R11-unstable/include/cpan.sminc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1972 - (hide annotations) (download)
Thu Jun 11 12:10:21 2009 UTC (14 years, 11 months ago) by niro
Original Path: trunk/core/include/cpan.sminc
File size: 985 byte(s)
-pass-through perl configure opts
1 niro 1971 # $ID$
2     # CPAN functions
3    
4     # needs perl
5     sminclude perl
6    
7     # needed extra vars:
8     # ${CPAN_AUTHOR}: needed, author of the CPAN-module
9     [[ -z ${CPAN_AUTHOR} ]] && die "cpan.sminc: \$CPAN_AUTHOR not given!"
10    
11     CPAN_AUTOR_UPPER=$(echo ${CPAN_AUTHOR} | tr [a-z] [A-Z])
12     CPAN_AUTOR_LOWER=$(echo ${CPAN_AUTHOR} | tr [A-Z] [a-z])
13    
14     # some sane defaults
15     : ${PCATEGORIE="dev-perl"}
16     # always lower letters
17     : ${HOMEPAGE="http://search.cpan.org/~${CPAN_AUTHOR_LOWER}/"}
18     : ${SRCFILE="${PNAME}.pm-${PVER}.tar.gz"}
19     : ${SRCDIR="${BUILDDIR}/${PNAME}.pm-${PVER}"}
20    
21     DEPEND="${DEPEND}
22     >= dev-lang/perl-5.10"
23    
24     SRC_URI=(
25     ${SRC_URI[*]}
26     http://search.cpan.org/CPAN/authors/id/${CPAN_AUTHOR_UPPER:0:1}/${CPAN_AUTHOR_UPPER:0:2}/${CPAN_AUTHOR_UPPER}/${SRCFILE}
27     mirror://${PNAME}/${SRCFILE}
28     )
29    
30     cpan_src_prepare()
31     {
32     perl_src_prepare
33     }
34    
35     cpan_src_compile()
36     {
37 niro 1972 local configure_opts="$@"
38     perl_src_compile ${configure_opts}
39 niro 1971 }
40    
41     src_install()
42     {
43     perl_src_compile
44     }
45    
46     export_inherits cpan src_prepare src_compile src_install