/[gentoo-x86]/eclass/perl-module.eclass
Gentoo

Diff of /eclass/perl-module.eclass

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

Revision 1.129 Revision 1.130
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2009 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.129 2011/01/30 08:18:42 tove Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.130 2011/08/09 11:48:31 tove Exp $
4# 4#
5# Author: Seemant Kulleen <seemant@gentoo.org> 5# Author: Seemant Kulleen <seemant@gentoo.org>
6 6
7# @ECLASS: perl-module.eclass 7# @ECLASS: perl-module.eclass
8# @MAINTAINER: 8# @MAINTAINER:
52 52
53DESCRIPTION="Based on the $ECLASS eclass" 53DESCRIPTION="Based on the $ECLASS eclass"
54 54
55LICENSE="${LICENSE:-|| ( Artistic GPL-1 GPL-2 GPL-3 )}" 55LICENSE="${LICENSE:-|| ( Artistic GPL-1 GPL-2 GPL-3 )}"
56 56
57# TODO: Document variables: MODULE_VERSION, MODULE_A, MODULE_A_EXT,
58# MODULE_AUTHOR, MODULE_SECTION, GENTOO_DEPEND_ON_PERL, PREFER_BUILDPL
59if [[ -n ${MY_PN} || -n ${MY_PV} || -n ${MODULE_VERSION} ]] ; then 57if [[ -n ${MY_PN} || -n ${MY_PV} || -n ${MODULE_VERSION} ]] ; then
60 : ${MY_P:=${MY_PN:-${PN}}-${MY_PV:-${MODULE_VERSION:-${PV}}}} 58 : ${MY_P:=${MY_PN:-${PN}}-${MY_PV:-${MODULE_VERSION:-${PV}}}}
61 S=${MY_S:-${WORKDIR}/${MY_P}} 59 S=${MY_S:-${WORKDIR}/${MY_P}}
62fi 60fi
61
63[[ -z "${SRC_URI}" && -z "${MODULE_A}" ]] && \ 62[[ -z "${SRC_URI}" && -z "${MODULE_A}" ]] && \
64 MODULE_A="${MY_P:-${P}}.${MODULE_A_EXT:-tar.gz}" 63 MODULE_A="${MY_P:-${P}}.${MODULE_A_EXT:-tar.gz}"
65[[ -z "${SRC_URI}" && -n "${MODULE_AUTHOR}" ]] && \ 64[[ -z "${SRC_URI}" && -n "${MODULE_AUTHOR}" ]] && \
66 SRC_URI="mirror://cpan/authors/id/${MODULE_AUTHOR:0:1}/${MODULE_AUTHOR:0:2}/${MODULE_AUTHOR}/${MODULE_SECTION:+${MODULE_SECTION}/}${MODULE_A}" 65 SRC_URI="mirror://cpan/authors/id/${MODULE_AUTHOR:0:1}/${MODULE_AUTHOR:0:2}/${MODULE_AUTHOR}/${MODULE_SECTION:+${MODULE_SECTION}/}${MODULE_A}"
67[[ -z "${HOMEPAGE}" ]] && \ 66[[ -z "${HOMEPAGE}" ]] && \
98 SRC_PREP="yes" 97 SRC_PREP="yes"
99 98
100 perl_set_version 99 perl_set_version
101 perl_set_eprefix 100 perl_set_eprefix
102 101
103 export PERL_MM_USE_DEFAULT=1 102 [[ -z ${pm_echovar} ]] && export PERL_MM_USE_DEFAULT=1
104 # Disable ExtUtils::AutoInstall from prompting 103 # Disable ExtUtils::AutoInstall from prompting
105 export PERL_EXTUTILS_AUTOINSTALL="--skipdeps" 104 export PERL_EXTUTILS_AUTOINSTALL="--skipdeps"
106 105
107 if [[ $(declare -p myconf 2>&-) != "declare -a myconf="* ]]; then 106 if [[ $(declare -p myconf 2>&-) != "declare -a myconf="* ]]; then
108 local myconf_local=(${myconf}) 107 local myconf_local=(${myconf})
368 perl_set_eprefix 367 perl_set_eprefix
369 368
370 local i ff 369 local i ff
371 if has "${EBUILD_PHASE:-none}" "postinst" "postrm" ; then 370 if has "${EBUILD_PHASE:-none}" "postinst" "postrm" ; then
372 for i in "${DUALLIFESCRIPTS[@]}" ; do 371 for i in "${DUALLIFESCRIPTS[@]}" ; do
373 alternatives_auto_makesym "/usr/bin/${i}" "/usr/bin/${i}-[0-9]*" 372 alternatives_auto_makesym "/${i}" "/${i}-[0-9]*"
373 done
374 for i in "${DUALLIFEMAN[@]}" ; do
374 ff=`echo "${EROOT}"/usr/share/man/man1/${i}-${PV}-${P}.1*` 375 ff=`echo "${EROOT}"/${i%.1}-${PV}-${P}.1*`
375 ff=${ff##*.1} 376 ff=${ff##*.1}
376 alternatives_auto_makesym "/usr/share/man/man1/${i}.1${ff}" "/usr/share/man/man1/${i}-[0-9]*" 377 alternatives_auto_makesym "/${i}${ff}" "/${i%.1}-[0-9]*"
377 done 378 done
378 else 379 else
379 pushd "${ED}" > /dev/null 380 pushd "${ED}" > /dev/null
380 for i in $(find usr/bin -maxdepth 1 -type f 2>/dev/null) ; do 381 for i in $(find usr/bin -maxdepth 1 -type f 2>/dev/null) ; do
381 mv ${i}{,-${PV}-${P}} || die 382 mv ${i}{,-${PV}-${P}} || die
382 DUALLIFESCRIPTS[${#DUALLIFESCRIPTS[*]}]=${i##*/} 383 #DUALLIFESCRIPTS[${#DUALLIFESCRIPTS[*]}]=${i##*/}
383 if [[ -f usr/share/man/man1/${i##*/}.1 ]] ; then 384 DUALLIFESCRIPTS[${#DUALLIFESCRIPTS[*]}]=${i}
384 mv usr/share/man/man1/${i##*/}{.1,-${PV}-${P}.1} || die 385 done
385 fi 386 for i in $(find usr/share/man/man1 -maxdepth 1 -type f 2>/dev/null) ; do
387 mv ${i} ${i%.1}-${PV}-${P}.1 || die
388 DUALLIFEMAN[${#DUALLIFEMAN[*]}]=${i}
386 done 389 done
387 popd > /dev/null 390 popd > /dev/null
388 fi 391 fi
389} 392}
390 393

Legend:
Removed from v.1.129  
changed lines
  Added in v.1.130

  ViewVC Help
Powered by ViewVC 1.1.20