Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/core/include/cpan.sminc revision 1971 by niro, Thu Jun 11 12:07:53 2009 UTC trunk/include/cpan.sminc revision 22058 by niro, Thu Aug 21 15:32:38 2014 UTC
# Line 1  Line 1 
1  # $ID$  # $Id$
2  # CPAN functions  # CPAN functions
3    
4  # needs perl  # needs perl
# Line 8  sminclude perl Line 8  sminclude perl
8  #   ${CPAN_AUTHOR}:   needed, author of the CPAN-module  #   ${CPAN_AUTHOR}:   needed, author of the CPAN-module
9  [[ -z ${CPAN_AUTHOR} ]] && die "cpan.sminc: \$CPAN_AUTHOR not given!"  [[ -z ${CPAN_AUTHOR} ]] && die "cpan.sminc: \$CPAN_AUTHOR not given!"
10    
11  CPAN_AUTOR_UPPER=$(echo ${CPAN_AUTHOR} | tr [a-z] [A-Z])  if [[ ${BASH_VERSINFO[0]} -le 3 ]]
12  CPAN_AUTOR_LOWER=$(echo ${CPAN_AUTHOR} | tr [A-Z] [a-z])  then
13     CPAN_AUTHOR_UPPER=$(echo ${CPAN_AUTHOR} | tr '[a-z]' '[A-Z]')
14     CPAN_AUTHOR_LOWER=$(echo ${CPAN_AUTHOR} | tr '[A-Z]' '[a-z]')
15    else
16     CPAN_AUTHOR_UPPER="${CPAN_AUTHOR^^}"
17     CPAN_AUTHOR_LOWER="${CPAN_AUTHOR,,}"
18    fi
19    
20    : ${CPAN_MODULE="${PNAME}"}
21    
22  # some sane defaults  # some sane defaults
23  : ${PCATEGORIE="dev-perl"}  : ${PCAT="dev-perl"}
24  # always lower letters  # always lower letters
25  : ${HOMEPAGE="http://search.cpan.org/~${CPAN_AUTHOR_LOWER}/"}  : ${HOMEPAGE="http://search.cpan.org/~${CPAN_AUTHOR_LOWER}/"}
26  : ${SRCFILE="${PNAME}.pm-${PVER}.tar.gz"}  : ${SRCFILE="${CPAN_MODULE}-${PVER}.tar.gz"}
27  : ${SRCDIR="${BUILDDIR}/${PNAME}.pm-${PVER}"}  : ${SRCDIR="${BUILDDIR}/${CPAN_MODULE}-${PVER}"}
28    
29  DEPEND="${DEPEND}  DEPEND="${DEPEND}
30   >= dev-lang/perl-5.10"   >= dev-lang/perl-5.20"
31    
32  SRC_URI=(  SRC_URI=(
33   ${SRC_URI[*]}   ${SRC_URI[*]}
# Line 27  SRC_URI=( Line 35  SRC_URI=(
35   mirror://${PNAME}/${SRCFILE}   mirror://${PNAME}/${SRCFILE}
36  )  )
37    
38    UP2DATE="updatecmd_perl ${CPAN_MODULE} gz"
39    
40  cpan_src_prepare()  cpan_src_prepare()
41  {  {
42   perl_src_prepare   perl_src_prepare || die
43  }  }
44    
45  cpan_src_compile()  cpan_src_compile()
46  {  {
47   perl_src_compile   local configure_opts="$@"
48     perl_src_compile ${configure_opts} || die
49    }
50    
51    cpan_src_check()
52    {
53     return 0
54    }
55    
56    cpan_multilib_src_compile()
57    {
58     local configure_opts="$@"
59     perl_multilib_src_compile ${configure_opts} || die
60    }
61    
62    cpan_src_install()
63    {
64     perl_src_install || die
65  }  }
66    
67  src_install()  cpan_multilib_src_install()
68  {  {
69   perl_src_compile   perl_multilib_src_install || die
70  }  }
71    
72  export_inherits cpan src_prepare src_compile src_install  export_inherits cpan src_prepare src_check
73    if [[ ${MULTILIB_BUILD} = true ]]
74    then
75     export_inherits cpan_multilib src_compile src_install
76    else
77     export_inherits cpan src_compile src_install
78    fi

Legend:
Removed from v.1971  
changed lines
  Added in v.22058