/[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.86 Revision 1.128
1# Copyright 1999-2004 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.86 2006/04/03 11:16:52 mcummings Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.128 2011/01/23 22:12:13 robbat2 Exp $
4# 4#
5# Author: Seemant Kulleen <seemant@gentoo.org> 5# Author: Seemant Kulleen <seemant@gentoo.org>
6# Maintained by the Perl herd <perl@gentoo.org> 6
7# 7# @ECLASS: perl-module.eclass
8# @MAINTAINER:
9# perl@gentoo.org
10# @BLURB: eclass for perl modules
11# @DESCRIPTION:
8# The perl-module eclass is designed to allow easier installation of perl 12# The perl-module eclass is designed to allow easier installation of perl
9# modules, and their incorporation into the Gentoo Linux system. 13# modules, and their incorporation into the Gentoo Linux system.
10 14
15inherit eutils base
16[[ ${CATEGORY} == "perl-core" ]] && inherit alternatives
11 17
12EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst pkg_prerm pkg_postrm src_compile src_install src_test 18PERL_EXPF="src_unpack src_compile src_test src_install"
13 19
14# 2005.04.28 mcummings 20case "${EAPI:-0}" in
15# Mounting problems with src_test functions has forced me to make the 21 0|1)
16# compilation of perl modules honor the FEATURES maketest flag rather than what 22 PERL_EXPF+=" pkg_setup pkg_preinst pkg_postinst pkg_prerm pkg_postrm"
17# is generally necessary. I've left a block to make sure we still need to set 23 ;;
18# the SRC_TEST="do" flag on the suspicion that otherwise we will face 10 times 24 2|3)
19# as many bug reports as we have lately. 25 PERL_EXPF+=" src_prepare src_configure"
26 [[ ${CATEGORY} == "perl-core" ]] && \
27 PERL_EXPF+=" pkg_postinst pkg_postrm"
20 28
21# 2004.05.10 rac 29 case "${GENTOO_DEPEND_ON_PERL:-yes}" in
22# block on makemaker versions earlier than that in the 5.8.2 core. in 30 yes)
23# actuality, this should be handled in the perl ebuild, so every perl 31 DEPEND="dev-lang/perl[-build]"
24# ebuild should block versions of MakeMaker older than the one it 32 RDEPEND="${DEPEND}"
25# carries. in the meantime, since we have dumped support for MakeMaker 33 ;;
26# <6.11 and the associated broken DESTDIR handling, block here to save 34 esac
27# people from sandbox trouble. 35 ;;
28# 36 *)
29# 2004.05.25 rac 37 die "EAPI=${EAPI} is not supported by perl-module.eclass"
30# for the same reasons, make the perl dep >=5.8.2 to get everybody 38 ;;
31# with 5.8.0 and its 6.03 makemaker up to a version that can 39esac
32# understand DESTDIR
33#
34# 2004.10.01 mcummings
35# noticed a discrepancy in how we were sed fixing references to ${D}
36#
37# 2005.03.14 mcummings
38# Updated eclass to include a specific function for dealing with perlocal.pods -
39# this should avoid the conflicts we've been running into with the introduction
40# of file collision features by giving us a single exportable function to deal
41# with the pods. Modifications to the eclass provided by Yaakov S
42# <yselkowitz@hotmail.com> in bug 83622
43#
44# <later the same day>
45# The long awaited (by me) fix for automagically detecting and dealing
46# with module-build dependancies. I've chosen not to make it a default dep since
47# this adds overhead to people that might not otherwise need it, and instead
48# modified the eclass to detect the existence of a Build.PL and behave
49# accordingly. This will fix issues with g-cpan builds that needs module-build
50# support, as well as get rid of the (annoying) style=builder vars. I know of
51# only one module that needed to be hacked for this, Class-MethodMaker-2.05, but
52# that module has a bad Build.PL to begin with. Ebuilds should continue to
53# DEPEND on module-build<-version> as needed, but there should be no need for
54# the style directive any more (especially since it isn't in the eclass
55# anymore). Enjoy!
56#
57# 2005.07.18 mcummings
58# Fix for proper handling of $mydoc - thanks to stkn for noticing we were
59# bombing out there
60#
61# 2005.07.19 mcummings
62# Providing an override var for the use of Module::Build. While it is being
63# incorporated in more and more modules, not module authors have working
64# Build.PL's in place. The override is to allow for a fallback to the "classic"
65# Makfile.PL - example is Class::MethodMaker, which provides a Build.PL that is
66# severely broken.
67#
68# 2006.02.11 mcummings
69# Per a conversation with solar, adding a change to the dep/rdep lines for
70# minimal. Should fix bug 68367 and bug 83622, as well as other embedded builds
71# that use perl components without providing perl
72 40
41case "${PERL_EXPORT_PHASE_FUNCTIONS:-yes}" in
42 yes)
43 EXPORT_FUNCTIONS ${PERL_EXPF}
44 ;;
45 no)
46 debug-print "PERL_EXPORT_PHASE_FUNCTIONS=no"
47 ;;
48 *)
49 die "PERL_EXPORT_PHASE_FUNCTIONS=${PERL_EXPORT_PHASE_FUNCTIONS} is not supported by perl-module.eclass"
50 ;;
51esac
73 52
74IUSE="minimal" 53DESCRIPTION="Based on the $ECLASS eclass"
75DEPEND=">=dev-lang/perl-5.8.2 !<perl-core/ExtUtils-MakeMaker-6.17" 54
76RDEPEND="!minimal? ( ${DEPEND} )" 55LICENSE="${LICENSE:-|| ( Artistic GPL-1 GPL-2 GPL-3 )}"
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
60 : ${MY_P:=${MY_PN:-${PN}}-${MY_PV:-${MODULE_VERSION:-${PV}}}}
61 S=${MY_S:-${WORKDIR}/${MY_P}}
62fi
63[[ -z "${SRC_URI}" && -z "${MODULE_A}" ]] && \
64 MODULE_A="${MY_P:-${P}}.${MODULE_A_EXT:-tar.gz}"
65[[ -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}"
67[[ -z "${HOMEPAGE}" ]] && \
68 HOMEPAGE="http://search.cpan.org/dist/${MY_PN:-${PN}}/"
69
77SRC_PREP="no" 70SRC_PREP="no"
78SRC_TEST="skip" 71SRC_TEST="skip"
79USE_BUILDER="yes" 72PREFER_BUILDPL="yes"
80 73
81PERL_VERSION="" 74pm_echovar=""
82SITE_ARCH="" 75perlinfo_done=false
83SITE_LIB="" 76
84VENDOR_LIB="" 77perl-module_src_unpack() {
85VENDOR_ARCH="" 78 debug-print-function $FUNCNAME "$@"
86ARCH_LIB="" 79 base_src_unpack
87POD_DIR="" 80 has src_prepare ${PERL_EXPF} || perl-module_src_prepare
88BUILDER_VER="" 81}
82
83perl-module_src_prepare() {
84 debug-print-function $FUNCNAME "$@"
85 has src_prepare ${PERL_EXPF} && base_src_prepare
86 perl_fix_osx_extra
87 esvn_clean
88}
89
90perl-module_src_configure() {
91 debug-print-function $FUNCNAME "$@"
92 perl-module_src_prep
93}
89 94
90perl-module_src_prep() { 95perl-module_src_prep() {
96 debug-print-function $FUNCNAME "$@"
97 [[ ${SRC_PREP} = yes ]] && return 0
98 SRC_PREP="yes"
91 99
92 perlinfo 100 perl_set_version
101 perl_set_eprefix
93 102
94 export PERL_MM_USE_DEFAULT=1 103 export PERL_MM_USE_DEFAULT=1
104 # Disable ExtUtils::AutoInstall from prompting
105 export PERL_EXTUTILS_AUTOINSTALL="--skipdeps"
95 106
107 if [[ $(declare -p myconf 2>&-) != "declare -a myconf="* ]]; then
108 local myconf_local=(${myconf})
109 else
110 local myconf_local=("${myconf[@]}")
111 fi
96 112
97 SRC_PREP="yes" 113 if [[ ( ${PREFER_BUILDPL} == yes || ! -f Makefile.PL ) && -f Build.PL ]] ; then
114 einfo "Using Module::Build"
115 if [[ ${DEPEND} != *virtual/perl-Module-Build* && ${PN} != Module-Build ]] ; then
116 eqawarn "QA Notice: The ebuild uses Module::Build but doesn't depend on it."
117 eqawarn " Add virtual/perl-Module-Build to DEPEND!"
118 if [[ -n ${PERLQAFATAL} ]]; then
119 eerror "Bailing out due to PERLQAFATAL=1";
120 die;
121 fi
122 fi
123 set -- \
124 --installdirs=vendor \
125 --libdoc= \
126 --destdir="${D}" \
127 --create_packlist=0 \
128 "${myconf_local[@]}"
129 einfo "perl Build.PL" "$@"
130 perl Build.PL "$@" <<< "${pm_echovar}" \
131 || die "Unable to build!"
98 if [ -f Makefile.PL ]; then 132 elif [[ -f Makefile.PL ]] ; then
99 einfo "Using ExtUtils::MakeMaker" 133 einfo "Using ExtUtils::MakeMaker"
100 #perl Makefile.PL ${myconf} \ 134 set -- \
101 perl Makefile.PL ${myconf} INSTALLMAN3DIR='none'\ 135 PREFIX=${EPREFIX}/usr \
102 PREFIX=/usr INSTALLDIRS=vendor DESTDIR=${D} 136 INSTALLDIRS=vendor \
103 elif [ -f Build.PL ] && [ "${USE_BUILDER}" == "yes" ]; then 137 INSTALLMAN3DIR='none' \
104 einfo "Using Module::Build" 138 DESTDIR="${D}" \
105 if [ -z ${BUILDER_VER} ]; then 139 "${myconf_local[@]}"
106 eerror 140 einfo "perl Makefile.PL" "$@"
107 eerror "Please post a bug on http://bugs.gentoo.org assigned to" 141 perl Makefile.PL "$@" <<< "${pm_echovar}" \
108 eerror "perl@gentoo.org - ${P} was added without a dependancy" 142 || die "Unable to build!"
109 eerror "on dev-perl/module-build" 143 fi
110 eerror "${BUILDER_VER}" 144 if [[ ! -f Build.PL && ! -f Makefile.PL ]] ; then
111 eerror 145 einfo "No Make or Build file detected..."
112 die 146 return
147 fi
148}
149
150perl-module_src_compile() {
151 debug-print-function $FUNCNAME "$@"
152 perl_set_version
153
154 has src_configure ${PERL_EXPF} || perl-module_src_prep
155
156 if [[ $(declare -p mymake 2>&-) != "declare -a mymake="* ]]; then
157 local mymake_local=(${mymake})
113 else 158 else
114 perl Build.PL installdirs=vendor destdir=${D} libdoc= 159 local mymake_local=("${mymake[@]}")
160 fi
161
162 if [[ -f Build ]] ; then
163 ./Build build \
164 || die "Compilation failed"
165 elif [[ -f Makefile ]] ; then
166 set -- \
167 OTHERLDFLAGS="${LDFLAGS}" \
168 "${mymake_local[@]}"
169 einfo "emake" "$@"
170 emake "$@" \
171 || die "Compilation failed"
172# OPTIMIZE="${CFLAGS}" \
173 fi
174}
175
176# For testers:
177# This code attempts to work out your threadingness from MAKEOPTS
178# and apply them to Test::Harness.
179#
180# If you want more verbose testing, set TEST_VERBOSE=1
181# in your bashrc | /etc/make.conf | ENV
182#
183# For ebuild writers:
184# If you wish to enable default tests w/ 'make test' ,
185#
186# SRC_TEST="do"
187#
188# If you wish to have threads run in parallel ( using the users makeopts )
189# all of the following have been tested to work.
190#
191# SRC_TEST="do parallel"
192# SRC_TEST="parallel"
193# SRC_TEST="parallel do"
194# SRC_TEST=parallel
195#
196
197perl-module_src_test() {
198 debug-print-function $FUNCNAME "$@"
199 if has 'do' ${SRC_TEST} || has 'parallel' ${SRC_TEST} ; then
200 if has "${TEST_VERBOSE:-0}" 0 && has 'parallel' ${SRC_TEST} ; then
201 export HARNESS_OPTIONS=j$(echo -j1 ${MAKEOPTS} | sed -r "s/.*(-j\s*|--jobs=)([0-9]+).*/\2/" )
202 einfo "Test::Harness Jobs=${HARNESS_OPTIONS}"
115 fi 203 fi
204 ${perlinfo_done} || perl_set_version
205 if [[ -f Build ]] ; then
206 ./Build test verbose=${TEST_VERBOSE:-0} || die "test failed"
207 elif [[ -f Makefile ]] ; then
208 emake test TEST_VERBOSE=${TEST_VERBOSE:-0} || die "test failed"
209 fi
210 fi
211}
212
213perl-module_src_install() {
214 debug-print-function $FUNCNAME "$@"
215
216 perl_set_version
217 perl_set_eprefix
218
219 local f
220
221 if [[ -z ${mytargets} ]] ; then
222 case "${CATEGORY}" in
223 dev-perl|perl-core) mytargets="pure_install" ;;
224 *) mytargets="install" ;;
225 esac
226 fi
227
228 if [[ $(declare -p myinst 2>&-) != "declare -a myinst="* ]]; then
229 local myinst_local=(${myinst})
116 else 230 else
117 einfo "No Make or Build file detect..." 231 local myinst_local=("${myinst[@]}")
118 return
119 fi
120}
121
122perl-module_src_compile() {
123
124 perlinfo
125 [ "${SRC_PREP}" != "yes" ] && perl-module_src_prep
126 if [ -z ${BUILDER_VER} ]; then
127 make ${mymake} || die "compilation failed"
128 else
129 perl ${S}/Build build
130 fi
131
132}
133
134perl-module_src_test() {
135 if [ "${SRC_TEST}" == "do" ]; then
136 perlinfo
137 if [ -z ${BUILDER_VER} ]; then
138 make test || die "test failed"
139 else
140 perl ${S}/Build test || die "test failed"
141 fi 232 fi
142 fi
143}
144 233
234 if [[ -f Build ]] ; then
235 ./Build ${mytargets} \
236 || die "./Build ${mytargets} failed"
237 elif [[ -f Makefile ]] ; then
238 emake "${myinst_local[@]}" ${mytargets} \
239 || die "emake ${myinst_local[@]} ${mytargets} failed"
240 fi
241
242 perl_delete_module_manpages
243 perl_delete_localpod
244 perl_delete_packlist
245 perl_remove_temppath
246
247 for f in Change* CHANGES README* TODO FAQ ${mydoc}; do
248 [[ -s ${f} ]] && dodoc ${f}
249 done
250
251 perl_link_duallife_scripts
252}
253
254perl-module_pkg_setup() {
255 debug-print-function $FUNCNAME "$@"
256 perl_set_version
257}
258
145perl-module_src_install() { 259perl-module_pkg_preinst() {
260 debug-print-function $FUNCNAME "$@"
261 perl_set_version
262}
146 263
264perl-module_pkg_postinst() {
265 debug-print-function $FUNCNAME "$@"
266 perl_link_duallife_scripts
267}
268
269perl-module_pkg_prerm() {
270 debug-print-function $FUNCNAME "$@"
271}
272
273perl-module_pkg_postrm() {
274 debug-print-function $FUNCNAME "$@"
275 perl_link_duallife_scripts
276}
277
147 perlinfo 278perlinfo() {
279 debug-print-function $FUNCNAME "$@"
280 perl_set_version
281}
148 282
149 test -z ${mytargets} && mytargets="install" 283perl_set_version() {
284 debug-print-function $FUNCNAME "$@"
285 debug-print "$FUNCNAME: perlinfo_done=${perlinfo_done}"
286 ${perlinfo_done} && return 0
287 perlinfo_done=true
150 288
151 if [ -z ${BUILDER_VER} ]; then 289 local f version install{{site,vendor}{arch,lib},archlib}
152 make ${myinst} ${mytargets} || die 290 eval "$(perl -V:{version,install{{site,vendor}{arch,lib},archlib}} )"
153 else 291 PERL_VERSION=${version}
154 perl ${S}/Build install 292 SITE_ARCH=${installsitearch}
155 fi 293 SITE_LIB=${installsitelib}
294 ARCH_LIB=${installarchlib}
295 VENDOR_LIB=${installvendorlib}
296 VENDOR_ARCH=${installvendorarch}
297}
156 298
157 fixlocalpod 299fixlocalpod() {
300 debug-print-function $FUNCNAME "$@"
301 perl_delete_localpod
302}
158 303
159 for FILE in `find ${D} -type f |grep -v '.so'`; do 304perl_delete_localpod() {
160 STAT=`file $FILE| grep -i " text"` 305 debug-print-function $FUNCNAME "$@"
161 if [ "${STAT}x" != "x" ]; then 306
307 find "${D}" -type f -name perllocal.pod -delete
308 find "${D}" -depth -mindepth 1 -type d -empty -delete
309}
310
311perl_fix_osx_extra() {
312 debug-print-function $FUNCNAME "$@"
313
314 # Remove "AppleDouble encoded Macintosh file"
315 local f
316 find "${S}" -type f -name "._*" -print0 | while read -rd '' f ; do
317 einfo "Removing AppleDouble encoded Macintosh file: ${f#${S}/}"
318 rm -f "${f}"
319 f=${f#${S}/}
320 # f=${f//\//\/}
321 # f=${f//\./\.}
322 # sed -i "/${f}/d" "${S}"/MANIFEST || die
323 grep -q "${f}" "${S}"/MANIFEST && \
324 elog "AppleDouble encoded Macintosh file in MANIFEST: ${f#${S}/}"
325 done
326}
327
328perl_delete_module_manpages() {
329 debug-print-function $FUNCNAME "$@"
330
331 perl_set_eprefix
332
333 if [[ -d "${ED}"/usr/share/man ]] ; then
334# einfo "Cleaning out stray man files"
335 find "${ED}"/usr/share/man -type f -name "*.3pm" -delete
336 find "${ED}"/usr/share/man -depth -type d -empty -delete
337 fi
338}
339
340
341perl_delete_packlist() {
342 debug-print-function $FUNCNAME "$@"
343 perl_set_version
344 if [[ -d ${D}/${VENDOR_ARCH} ]] ; then
345 find "${D}/${VENDOR_ARCH}" -type f -a \( -name .packlist \
346 -o \( -name '*.bs' -a -empty \) \) -delete
347 find "${D}" -depth -mindepth 1 -type d -empty -delete
348 fi
349}
350
351perl_remove_temppath() {
352 debug-print-function $FUNCNAME "$@"
353
354 find "${D}" -type f -not -name '*.so' -print0 | while read -rd '' f ; do
355 if file "${f}" | grep -q -i " text" ; then
356 grep -q "${D}" "${f}" && ewarn "QA: File contains a temporary path ${f}"
162 sed -i -e "s:${D}:/:g" ${FILE} 357 sed -i -e "s:${D}:/:g" "${f}"
163 fi 358 fi
164 done 359 done
360}
165 361
166 for doc in Change* MANIFEST* README* ${mydoc}; do 362perl_link_duallife_scripts() {
167 [ -s "$doc" ] && dodoc $doc 363 debug-print-function $FUNCNAME "$@"
364 if [[ ${CATEGORY} != perl-core ]] || ! has_version ">=dev-lang/perl-5.8.8-r8" ; then
365 return 0
366 fi
367
368 perl_set_eprefix
369
370 local i ff
371 if has "${EBUILD_PHASE:-none}" "postinst" "postrm" ; then
372 for i in "${DUALLIFESCRIPTS[@]}" ; do
373 alternatives_auto_makesym "/usr/bin/${i}" "/usr/bin/${i}-[0-9]*"
374 ff=`echo "${EROOT}"/usr/share/man/man1/${i}-${PV}-${P}.1*`
375 ff=${ff##*.1}
376 alternatives_auto_makesym "/usr/share/man/man1/${i}.1${ff}" "/usr/share/man/man1/${i}-[0-9]*"
168 done 377 done
169}
170
171
172perl-module_pkg_setup() {
173
174 perlinfo
175}
176
177
178perl-module_pkg_preinst() {
179
180 perlinfo
181}
182
183perl-module_pkg_postinst() {
184
185 einfo "Man pages are not installed for most modules now."
186 einfo "Please use perldoc instad."
187 updatepod
188}
189
190perl-module_pkg_prerm() {
191
192 updatepod
193}
194
195perl-module_pkg_postrm() {
196
197 updatepod
198}
199
200perlinfo() {
201
202 local version
203 eval `perl '-V:version'`
204 PERL_VERSION=${version}
205
206 local installsitearch
207 eval `perl '-V:installsitearch'`
208 SITE_ARCH=${installsitearch}
209
210 local installsitelib
211 eval `perl '-V:installsitelib'`
212 SITE_LIB=${installsitelib}
213
214 local installarchlib
215 eval `perl '-V:installarchlib'`
216 ARCH_LIB=${installarchlib}
217
218 local installvendorlib
219 eval `perl '-V:installvendorlib'`
220 VENDOR_LIB=${installvendorlib}
221
222 local installvendorarch
223 eval `perl '-V:installvendorarch'`
224 VENDOR_ARCH=${installvendorarch}
225
226 if [ "${USE_BUILDER}" == "yes" ]; then
227 if [ ! -f ${S}/Makefile.PL ]; then
228 if [ -f ${S}/Build.PL ]; then
229 if [ ${PN} == "module-build" ]; then
230 BUILDER_VER="1" # A bootstrapping if you will
231 else 378 else
232 BUILDER_VER=`perl -MModule::Build -e 'print "$Module::Build::VERSION;"' ` 379 pushd "${ED}" > /dev/null
380 for i in $(find usr/bin -maxdepth 1 -type f 2>/dev/null) ; do
381 mv ${i}{,-${PV}-${P}} || die
382 DUALLIFESCRIPTS[${#DUALLIFESCRIPTS[*]}]=${i##*/}
383 if [[ -f usr/share/man/man1/${i##*/}.1 ]] ; then
384 mv usr/share/man/man1/${i##*/}{.1,-${PV}-${P}.1} || die
233 fi 385 fi
234 fi
235 fi
236 fi
237
238 if [ -f /usr/bin/perl ]
239 then
240 POD_DIR="/usr/share/perl/gentoo-pods/${version}"
241 fi
242}
243
244fixlocalpod() {
245 perlinfo
246 dodir ${POD_DIR}
247
248 if [ -f ${D}${ARCH_LIB}/perllocal.pod ];
249 then
250 touch ${D}/${POD_DIR}/${P}.pod
251 sed -e "s:${D}::g" \
252 ${D}${ARCH_LIB}/perllocal.pod >> ${D}/${POD_DIR}/${P}.pod
253 touch ${D}/${POD_DIR}/${P}.pod.arch
254 cat ${D}/${POD_DIR}/${P}.pod >>${D}/${POD_DIR}/${P}.pod.arch
255 rm -f ${D}/${ARCH_LIB}/perllocal.pod
256 fi
257
258 if [ -f ${D}${SITE_LIB}/perllocal.pod ];
259 then
260 touch ${D}/${POD_DIR}/${P}.pod
261 sed -e "s:${D}::g" \
262 ${D}${SITE_LIB}/perllocal.pod >> ${D}/${POD_DIR}/${P}.pod
263 touch ${D}/${POD_DIR}/${P}.pod.site
264 cat ${D}/${POD_DIR}/${P}.pod >>${D}/${POD_DIR}/${P}.pod.site
265 rm -f ${D}/${SITE_LIB}/perllocal.pod
266 fi
267
268 if [ -f ${D}${VENDOR_LIB}/perllocal.pod ];
269 then
270 touch ${D}/${POD_DIR}/${P}.pod
271 sed -e "s:${D}::g" \
272 ${D}${VENDOR_LIB}/perllocal.pod >> ${D}/${POD_DIR}/${P}.pod
273 touch ${D}/${POD_DIR}/${P}.pod.vendor
274 cat ${D}/${POD_DIR}/${P}.pod >>${D}/${POD_DIR}/${P}.pod.vendor
275 rm -f ${D}/${VENDOR_LIB}/perllocal.pod
276 fi
277}
278
279updatepod() {
280 perlinfo
281
282 if [ -d "${POD_DIR}" ]
283 then
284 for FILE in `find ${POD_DIR} -type f -name "*.pod.arch"`; do
285 cat ${FILE} >> ${ARCH_LIB}/perllocal.pod
286 rm -f ${FILE}
287 done 386 done
288 for FILE in `find ${POD_DIR} -type f -name "*.pod.site"`; do 387 popd > /dev/null
289 cat ${FILE} >> ${SITE_LIB}/perllocal.pod 388 fi
290 rm -f ${FILE} 389}
291 done 390
292 for FILE in `find ${POD_DIR} -type f -name "*.pod.vendor"`; do 391perl_set_eprefix() {
293 cat ${FILE} >> ${VENDOR_LIB}/perllocal.pod 392 debug-print-function $FUNCNAME "$@"
294 rm -f ${FILE} 393 case ${EAPI:-0} in
295 done 394 0|1|2)
395 if ! use prefix; then
396 EPREFIX=
397 ED=${D}
398 EROOT=${ROOT}
296 fi 399 fi
400 ;;
401 esac
297} 402}

Legend:
Removed from v.1.86  
changed lines
  Added in v.1.128

  ViewVC Help
Powered by ViewVC 1.1.20