Magellan Linux

Diff of /trunk/include/cpan.sminc

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

trunk/core/include/cpan.sminc revision 1980 by niro, Thu Jun 11 12:29:18 2009 UTC trunk/include/cpan.sminc revision 26386 by niro, Fri Jun 26 09:50:05 2015 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_AUTHOR_UPPER=$(echo ${CPAN_AUTHOR} | tr [a-z] [A-Z])  if [[ ${BASH_VERSINFO[0]} -le 3 ]]
12  CPAN_AUTHOR_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    : ${CPAN_TARBALL_SUFFIX="gz"}
22    
23  # some sane defaults  # some sane defaults
24  : ${PCATEGORIE="dev-perl"}  : ${PCAT="dev-perl"}
25  # always lower letters  # always lower letters
26  : ${HOMEPAGE="http://search.cpan.org/~${CPAN_AUTHOR_LOWER}/"}  : ${HOMEPAGE="http://search.cpan.org/~${CPAN_AUTHOR_LOWER}/"}
27  : ${SRCFILE="${PNAME}-${PVER}.tar.gz"}  : ${SRCFILE="${CPAN_MODULE}-${PVER}.tar.gz"}
28  : ${SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"}  : ${SRCDIR="${BUILDDIR}/${CPAN_MODULE}-${PVER}"}
29    
30  DEPEND="${DEPEND}  DEPEND="${DEPEND}
31   >= dev-lang/perl-5.10"   >= dev-lang/perl-5.22.0"
32    
33  SRC_URI=(  SRC_URI=(
34   ${SRC_URI[*]}   ${SRC_URI[*]}
# Line 27  SRC_URI=( Line 36  SRC_URI=(
36   mirror://${PNAME}/${SRCFILE}   mirror://${PNAME}/${SRCFILE}
37  )  )
38    
39    UP2DATE="updatecmd_perl ${CPAN_MODULE} ${CPAN_TARBALL_SUFFIX}"
40    
41  cpan_src_prepare()  cpan_src_prepare()
42  {  {
43   perl_src_prepare   perl_src_prepare || die
44  }  }
45    
46  cpan_src_compile()  cpan_src_compile()
47  {  {
48   local configure_opts="$@"   local configure_opts="$@"
49   perl_src_compile ${configure_opts}   perl_src_compile ${configure_opts} || die
50    }
51    
52    cpan_src_check()
53    {
54     return 0
55    }
56    
57    cpan_multilib_src_compile()
58    {
59     local configure_opts="$@"
60     perl_multilib_src_compile ${configure_opts} || die
61  }  }
62    
63  cpan_src_install()  cpan_src_install()
64  {  {
65   perl_src_install   perl_src_install || die
66    }
67    
68    cpan_multilib_src_install()
69    {
70     perl_multilib_src_install || die
71  }  }
72    
73  export_inherits cpan src_prepare src_compile src_install  export_inherits cpan src_prepare src_check
74    if [[ ${MULTILIB_BUILD} = true ]]
75    then
76     export_inherits cpan_multilib src_compile src_install
77    else
78     export_inherits cpan src_compile src_install
79    fi

Legend:
Removed from v.1980  
changed lines
  Added in v.26386