Gentoo Archives: gentoo-commits

From: "Torsten Veller (tove)" <tove@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-lang/perl: ChangeLog perl-5.8.8-r5.ebuild
Date: Fri, 09 May 2008 11:12:03
Message-Id: E1JuQW8-0000qy-8y@stork.gentoo.org
1 tove 08/05/09 11:12:00
2
3 Modified: ChangeLog
4 Added: perl-5.8.8-r5.ebuild
5 Log:
6 #219203 - Fix for CVE-2008-1927
7 (Portage version: 2.1.5_rc7)
8
9 Revision Changes Path
10 1.263 dev-lang/perl/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/perl/ChangeLog?rev=1.263&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/perl/ChangeLog?rev=1.263&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/perl/ChangeLog?r1=1.262&r2=1.263
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-lang/perl/ChangeLog,v
19 retrieving revision 1.262
20 retrieving revision 1.263
21 diff -u -r1.262 -r1.263
22 --- ChangeLog 19 Nov 2007 09:55:56 -0000 1.262
23 +++ ChangeLog 9 May 2008 11:11:59 -0000 1.263
24 @@ -1,6 +1,12 @@
25 # ChangeLog for dev-lang/perl
26 -# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/perl/ChangeLog,v 1.262 2007/11/19 09:55:56 ian Exp $
28 +# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
29 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/perl/ChangeLog,v 1.263 2008/05/09 11:11:59 tove Exp $
30 +
31 +*perl-5.8.8-r5 (09 May 2008)
32 +
33 + 09 May 2008; Torsten Veller <tove@g.o>
34 + +files/perl-5.8.8-CVE-2008-1927.patch, +perl-5.8.8-r5.ebuild:
35 + #219203 - Fix for CVE-2008-1927
36
37 *perl-5.8.8-r4 (19 Nov 2007)
38
39
40
41
42 1.1 dev-lang/perl/perl-5.8.8-r5.ebuild
43
44 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/perl/perl-5.8.8-r5.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/perl/perl-5.8.8-r5.ebuild?rev=1.1&content-type=text/plain
46
47 Index: perl-5.8.8-r5.ebuild
48 ===================================================================
49 # Copyright 1999-2008 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/dev-lang/perl/perl-5.8.8-r5.ebuild,v 1.1 2008/05/09 11:11:59 tove Exp $
52
53 inherit eutils flag-o-matic toolchain-funcs multilib
54
55 # The slot of this binary compat version of libperl.so
56 PERLSLOT="1"
57
58 SHORT_PV="${PV%.*}"
59 MY_P="perl-${PV/_rc/-RC}"
60 MY_PV="${PV%_rc*}"
61 DESCRIPTION="Larry Wall's Practical Extraction and Report Language"
62 S="${WORKDIR}/${MY_P}"
63 SRC_URI="mirror://cpan/src/${MY_P}.tar.bz2"
64 HOMEPAGE="http://www.perl.org/"
65 LIBPERL="libperl$(get_libname ${PERLSLOT}.${SHORT_PV})"
66
67 LICENSE="|| ( Artistic GPL-2 )"
68 SLOT="0"
69 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
70 IUSE="berkdb debug doc gdbm ithreads perlsuid build elibc_FreeBSD"
71 PERL_OLDVERSEN="5.8.0 5.8.2 5.8.4 5.8.5 5.8.6 5.8.7"
72
73 DEPEND="berkdb? ( sys-libs/db )
74 gdbm? ( >=sys-libs/gdbm-1.8.3 )
75 >=sys-devel/libperl-${PV}-r1
76 elibc_FreeBSD? ( sys-freebsd/freebsd-mk-defs )
77 <sys-devel/libperl-5.9
78 !<perl-core/File-Spec-0.87
79 !<perl-core/Test-Simple-0.47-r1"
80
81 RDEPEND="~sys-devel/libperl-${PV}
82 berkdb? ( sys-libs/db )
83 gdbm? ( >=sys-libs/gdbm-1.8.3 )
84 build? (
85 !perl-core/Test-Harness
86 !perl-core/PodParser
87 !dev-perl/Locale-gettext
88 )"
89
90 PDEPEND=">=app-admin/perl-cleaner-1.03
91 !build? (
92 >=perl-core/PodParser-1.32
93 >=perl-core/Test-Harness-2.56
94 )"
95
96 pkg_setup() {
97 # I think this should rather be displayed if you *have* 'ithreads'
98 # in USE if it could break things ...
99 if use ithreads
100 then
101 ewarn "PLEASE NOTE: You are compiling ${MY_P} with"
102 ewarn "interpreter-level threading enabled."
103 ewarn "Threading is not supported by all applications "
104 ewarn "that compile against perl. You use threading at "
105 ewarn "your own discretion. "
106 epause 5
107 fi
108
109 if [[ ! -f "${ROOT}/usr/$(get_libdir)/${LIBPERL}" ]]
110 then
111 # Make sure we have libperl installed ...
112 eerror "Cannot find ${ROOT}/usr/$(get_libdir)/${LIBPERL}! Make sure that you"
113 eerror "have sys-libs/libperl installed properly ..."
114 die "Cannot find ${ROOT}/usr/$(get_libdir)/${LIBPERL}!"
115 fi
116 }
117
118 src_unpack() {
119 unpack ${A}
120
121 # Get -lpthread linked before -lc. This is needed
122 # when using glibc >= 2.3, or else runtime signal
123 # handling breaks. Fixes bug #14380.
124 # <rac@g.o> (14 Feb 2003)
125 # reinstated to try to avoid sdl segfaults 03.10.02
126 cd "${S}"; epatch "${FILESDIR}"/${PN}-prelink-lpthread.patch
127
128 # Patch perldoc to not abort when it attempts to search
129 # nonexistent directories; fixes bug #16589.
130 # <rac@g.o> (28 Feb 2003)
131
132 cd "${S}"; epatch "${FILESDIR}"/${PN}-perldoc-emptydirs.patch
133
134 # this lays the groundwork for solving the issue of what happens
135 # when people (or ebuilds) install different versiosn of modules
136 # that are in the core, by rearranging the @INC directory to look
137 # site -> vendor -> core.
138 cd "${S}"; epatch "${FILESDIR}"/${P}-reorder-INC.patch
139
140 # some well-intentioned stuff in http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=Pine.SOL.4.10.10205231231200.5399-100000%40maxwell.phys.lafayette.edu
141 # attempts to avoid bringing cccdlflags to bear on static
142 # extensions (like DynaLoader). i believe this is
143 # counterproductive on a Gentoo system which has both a shared
144 # and static libperl, so effectively revert this here.
145 cd "${S}"; epatch "${FILESDIR}"/${PN}-picdl.patch
146
147 # Configure makes an unwarranted assumption that /bin/ksh is a
148 # good shell. This patch makes it revert to using /bin/sh unless
149 # /bin/ksh really is executable. Should fix bug 42665.
150 # rac 2004.06.09
151 cd "${S}"; epatch "${FILESDIR}"/${PN}-noksh.patch
152
153 # makedepend.SH contains a syntax error which is ignored by bash but causes
154 # dash to abort
155 epatch "${FILESDIR}"/${P}-makedepend-syntax.patch
156
157 # We do not want the build root in the linked perl module's RUNPATH, so
158 # strip paths containing PORTAGE_TMPDIR if its set. This is for the
159 # MakeMaker module, bug #105054.
160 epatch "${FILESDIR}"/${PN}-5.8.7-MakeMaker-RUNPATH.patch
161
162 # Starting and hopefully ending with 5.8.7 we observe stack
163 # corruption with the regexp handling in perls DynaLoader code
164 # with ssp enabled. This become fatal during compile time so we
165 # temporally disable ssp on two regexp files till upstream has a
166 # chance to work it out. Bug #97452
167 [[ -n $(test-flags -fno-stack-protector) ]] && \
168 epatch "${FILESDIR}"/${PN}-regexp-nossp.patch
169
170 # On PA7200, uname -a contains a single quote and we need to
171 # filter it otherwise configure fails. See #125535.
172 epatch "${FILESDIR}"/perl-hppa-pa7200-configure.patch
173
174 #[[ ${get_libdir} == lib64 ]] && cd ${S} && epatch ${FILESDIR}/${P}-lib64.patch
175 use amd64 || use ppc64 && cd "${S}" && epatch "${FILESDIR}"/${P}-lib64.patch
176
177 [[ ${CHOST} == *-dragonfly* ]] && cd "${S}" && epatch "${FILESDIR}"/${P}-dragonfly-clean.patch
178 [[ ${CHOST} == *-freebsd* ]] && cd "${S}" && epatch "${FILESDIR}"/${P}-fbsdhints.patch
179 cd "${S}"; epatch "${FILESDIR}"/${P}-USE_MM_LD_RUN_PATH.patch
180 cd "${S}"; epatch "${FILESDIR}"/${P}-links.patch
181 # c++ patch - should address swig related items
182 cd "${S}"; epatch "${FILESDIR}"/${P}-cplusplus.patch
183
184 epatch "${FILESDIR}"/${P}-gcc42-command-line.patch
185
186 # Newer linux-headers don't include asm/page.h. Fix this.
187 # Patch from bug 168312, thanks Peter!
188 has_version '>sys-kernel/linux-headers-2.6.20' && epatch "${FILESDIR}"/${P}-asm-page-h-compile-failure.patch
189
190 # perlcc fix patch - bug #181229
191 epatch "${FILESDIR}"/${P}-perlcc.patch
192
193 # patch to fix bug #198196
194 # UTF/Regular expressions boundary error (CVE-2007-5116)
195 epatch "${FILESDIR}"/${P}-utf8-boundary.patch
196
197 # patch to fix bug #219203
198 epatch "${FILESDIR}"/${P}-CVE-2008-1927.patch
199 }
200
201 myconf() {
202 # the myconf array is declared in src_configure
203 myconf=( "${myconf[@]}" "$@" )
204 }
205
206 src_configure() {
207 declare -a myconf
208
209 # some arches and -O do not mix :)
210 use arm && replace-flags -O? -O1
211 use ppc && replace-flags -O? -O1
212 use ia64 && replace-flags -O? -O1
213 # Perl has problems compiling with -Os in your flags with glibc
214 use elibc_uclibc || replace-flags "-Os" "-O2"
215 ( gcc-specs-ssp && use ia64 ) && append-flags -fno-stack-protector
216 # This flag makes compiling crash in interesting ways
217 filter-flags -malign-double
218 # Fixes bug #97645
219 use ppc && filter-flags -mpowerpc-gpopt
220 # Fixes bug #143895 on gcc-4.1.1
221 filter-flags "-fsched2-use-superblocks"
222
223 export LC_ALL="C"
224
225 case ${CHOST} in
226 *-freebsd*) osname="freebsd" ;;
227 *-dragonfly*) osname="dragonfly" ;;
228 *-netbsd*) osname="netbsd" ;;
229 *-openbsd*) osname="openbsd" ;;
230 *-darwin*) osname="darwin" ;;
231
232 *) osname="linux" ;;
233 esac
234
235 if use ithreads
236 then
237 einfo "using ithreads"
238 mythreading="-multi"
239 myconf -Dusethreads
240 myarch=${CHOST}
241 myarch="${myarch%%-*}-${osname}-thread"
242 else
243 myarch=${CHOST}
244 myarch="${myarch%%-*}-${osname}"
245 fi
246
247 local inclist=$(for v in $PERL_OLDVERSEN; do echo -n "$v $v/$myarch$mythreading "; done)
248
249 # allow either gdbm to provide ndbm (in <gdbm/ndbm.h>) or db1
250
251 myndbm='U'
252 mygdbm='U'
253 mydb='U'
254
255 if use gdbm
256 then
257 mygdbm='D'
258 myndbm='D'
259 fi
260 if use berkdb
261 then
262 mydb='D'
263 has_version '=sys-libs/db-1*' && myndbm='D'
264 fi
265
266 myconf "-${myndbm}i_ndbm" "-${mygdbm}i_gdbm" "-${mydb}i_db"
267
268 if use mips
269 then
270 # this is needed because gcc 3.3-compiled kernels will hang
271 # the machine trying to run this test - check with `Kumba
272 # <rac@g.o> 2003.06.26
273 myconf -Dd_u32align
274 fi
275
276 if use perlsuid
277 then
278 myconf -Dd_dosuid
279 ewarn "You have enabled Perl's suid compile. Please"
280 ewarn "read http://perldoc.com/perl5.8.2/INSTALL.html#suidperl"
281 epause 3
282 fi
283
284 if use debug
285 then
286 CFLAGS="${CFLAGS} -g"
287 myconf -DDEBUGGING
288 fi
289
290 if use sparc
291 then
292 myconf -Ud_longdbl
293 fi
294
295 if use alpha && "$(tc-getCC)" == "ccc"
296 then
297 ewarn "Perl will not be built with berkdb support, use gcc if you needed it..."
298 myconf -Ui_db -Ui_ndbm
299 fi
300
301 [[ -n "${ABI}" ]] && myconf "-Dusrinc=$(get_ml_incdir)"
302
303 [[ ${ELIBC} == "FreeBSD" ]] && myconf "-Dlibc=/usr/$(get_libdir)/libc.a"
304
305 if [[ $(get_libdir) != "lib" ]] ; then
306 # We need to use " and not ', as the written config.sh use ' ...
307 myconf "-Dlibpth=/usr/local/$(get_libdir) /$(get_libdir) /usr/$(get_libdir)"
308 fi
309
310 sh Configure -des \
311 -Darchname="${myarch}" \
312 -Dcccdlflags='-fPIC' \
313 -Dccdlflags='-rdynamic' \
314 -Dcc="$(tc-getCC)" \
315 -Dprefix='/usr' \
316 -Dvendorprefix='/usr' \
317 -Dsiteprefix='/usr' \
318 -Dlocincpth=' ' \
319 -Doptimize="${CFLAGS}" \
320 -Duselargefiles \
321 -Dd_semctl_semun \
322 -Dscriptdir=/usr/bin \
323 -Dman1dir=/usr/share/man/man1 \
324 -Dman3dir=/usr/share/man/man3 \
325 -Dinstallman1dir=/usr/share/man/man1 \
326 -Dinstallman3dir=/usr/share/man/man3 \
327 -Dman1ext='1' \
328 -Dman3ext='3pm' \
329 -Dinc_version_list="$inclist" \
330 -Dcf_by='Gentoo' \
331 -Ud_csh \
332 -Dusenm \
333 "${myconf[@]}" || die "Unable to configure"
334 }
335
336 src_compile() {
337
338 # would like to bracket this with a test for the existence of a
339 # dotfile, but can't clean it automatically now.
340
341 src_configure
342
343 emake -j1 || die "Unable to make"
344 }
345
346 src_test() {
347 use elibc_uclibc && export MAKEOPTS="${MAKEOPTS} -j1"
348 emake -i test CCDLFLAGS= || die "test failed"
349 }
350
351 src_install() {
352
353 export LC_ALL="C"
354
355 # Need to do this, else apps do not link to dynamic version of
356 # the library ...
357 local coredir="/usr/$(get_libdir)/perl5/${MY_PV}/${myarch}${mythreading}/CORE"
358 dodir ${coredir}
359 dosym ../../../../../$(get_libdir)/${LIBPERL} ${coredir}/${LIBPERL}
360 dosym ../../../../../$(get_libdir)/${LIBPERL} ${coredir}/libperl$(get_libname ${PERLSLOT})
361 dosym ../../../../../$(get_libdir)/${LIBPERL} ${coredir}/libperl$(get_libname)
362
363 # Fix for "stupid" modules and programs
364 dodir /usr/$(get_libdir)/perl5/site_perl/${MY_PV}/${myarch}${mythreading}
365
366 local installtarget=install
367 if use build ; then
368 installtarget=install.perl
369 fi
370 make DESTDIR="${D}" ${installtarget} || die "Unable to make ${installtarget}"
371
372 rm "${D}"/usr/bin/perl
373 ln -s perl${MY_PV} "${D}"/usr/bin/perl
374
375 cp -f utils/h2ph utils/h2ph_patched
376 epatch "${FILESDIR}"/${PN}-h2ph-ansi-header.patch
377
378 LD_LIBRARY_PATH=. ./perl -Ilib utils/h2ph_patched \
379 -a -d "${D}"/usr/$(get_libdir)/perl5/${MY_PV}/${myarch}${mythreading} <<EOF
380 asm/termios.h
381 syscall.h
382 syslimits.h
383 syslog.h
384 sys/ioctl.h
385 sys/socket.h
386 sys/time.h
387 wait.h
388 EOF
389
390 # This is to fix a missing c flag for backwards compat
391 for i in `find "${D}"/usr/$(get_libdir)/perl5 -iname "Config.pm"`;do
392 sed -e "s:ccflags=':ccflags='-DPERL5 :" \
393 -e "s:cppflags=':cppflags='-DPERL5 :" \
394 ${i} > ${i}.new &&\
395 mv ${i}.new ${i} || die "Sed failed"
396 done
397
398 # A poor fix for the miniperl issues
399 dosed 's:./miniperl:/usr/bin/perl:' /usr/$(get_libdir)/perl5/${MY_PV}/ExtUtils/xsubpp
400 fperms 0444 /usr/$(get_libdir)/perl5/${MY_PV}/ExtUtils/xsubpp
401 dosed 's:./miniperl:/usr/bin/perl:' /usr/bin/xsubpp
402 fperms 0755 /usr/bin/xsubpp
403
404 # This removes ${D} from Config.pm and .packlist
405 for i in `find "${D}" -iname "Config.pm"` `find "${D}" -iname ".packlist"`;do
406 einfo "Removing ${D} from ${i}..."
407 sed -e "s:${D}::" ${i} > ${i}.new &&\
408 mv ${i}.new ${i} || die "Sed failed"
409 done
410
411 # Note: find out from psm why we would need/want this.
412 # ( use berkdb && has_version '=sys-libs/db-1*' ) ||
413 # find ${D} -name "*NDBM*" | xargs rm -f
414
415 dodoc Changes* Artistic Copying README Todo* AUTHORS
416
417 if use doc
418 then
419 # HTML Documentation
420 # We expect errors, warnings, and such with the following.
421
422 dodir /usr/share/doc/${PF}/html
423 ./perl installhtml \
424 --podroot='.' \
425 --podpath='lib:ext:pod:vms' \
426 --recurse \
427 --htmldir="${D}/usr/share/doc/${PF}/html" \
428 --libpods='perlfunc:perlguts:perlvar:perlrun:perlop'
429 fi
430 cd `find "${D}" -name Path.pm|sed -e 's/Path.pm//'`
431 # CAN patch in bug 79685
432 epatch "${FILESDIR}"/${P}-CAN-2005-0448-rmtree.patch
433
434 # Remove those items we PDPEND on
435 rm -f "${D}"/usr/bin/pod2usage
436 rm -f "${D}"/usr/bin/podchecker
437 rm -f "${D}"/usr/bin/podselect
438 rm -f "${D}"/usr/bin/prove
439 rm -f "${D}"/usr/share/man/man1/pod2usage*
440 rm -f "${D}"/usr/share/man/man1/podchecker*
441 rm -f "${D}"/usr/share/man/man1/podselect*
442 rm -f "${D}"/usr/share/man/man1/prove*
443 if use build ; then
444 src_remove_extra_files
445 fi
446
447 }
448
449 src_remove_extra_files()
450 {
451 local prefix="./usr" # ./ is important
452 local bindir="${prefix}/bin"
453 local perlroot="${prefix}/$(get_libdir)/perl5" # perl installs per-arch dirs
454 local prV="${perlroot}/${MY_PV}"
455 # myarch and mythreading are defined inside src_configure()
456 local prVA="${prV}/${myarch}${mythreading}"
457
458 # I made this list from the Mandr*, Debian and ex-Connectiva perl-base list
459 # Then, I added several files to get GNU autotools running
460 # FIXME: should this be in a separated file to be sourced?
461 local MINIMAL_PERL_INSTALL="
462 ${bindir}/h2ph
463 ${bindir}/perl
464 ${bindir}/perl${MY_PV}
465 ${bindir}/pod2man
466 ${prV}/attributes.pm
467 ${prV}/AutoLoader.pm
468 ${prV}/autouse.pm
469 ${prV}/base.pm
470 ${prV}/bigint.pm
471 ${prV}/bignum.pm
472 ${prV}/bigrat.pm
473 ${prV}/blib.pm
474 ${prV}/bytes_heavy.pl
475 ${prV}/bytes.pm
476 ${prV}/Carp/Heavy.pm
477 ${prV}/Carp.pm
478 ${prV}/charnames.pm
479 ${prV}/Class/Struct.pm
480 ${prV}/constant.pm
481 ${prV}/diagnostics.pm
482 ${prV}/DirHandle.pm
483 ${prV}/Exporter/Heavy.pm
484 ${prV}/Exporter.pm
485 ${prV}/ExtUtils/Command.pm
486 ${prV}/ExtUtils/Constant.pm
487 ${prV}/ExtUtils/Embed.pm
488 ${prV}/ExtUtils/Installed.pm
489 ${prV}/ExtUtils/Install.pm
490 ${prV}/ExtUtils/Liblist.pm
491 ${prV}/ExtUtils/MakeMaker.pm
492 ${prV}/ExtUtils/Manifest.pm
493 ${prV}/ExtUtils/Mkbootstrap.pm
494 ${prV}/ExtUtils/Mksymlists.pm
495 ${prV}/ExtUtils/MM_Any.pm
496 ${prV}/ExtUtils/MM_MacOS.pm
497 ${prV}/ExtUtils/MM.pm
498 ${prV}/ExtUtils/MM_Unix.pm
499 ${prV}/ExtUtils/MY.pm
500 ${prV}/ExtUtils/Packlist.pm
501 ${prV}/ExtUtils/testlib.pm
502 ${prV}/ExtUtils/Miniperl.pm
503 ${prV}/ExtUtils/Command/MM.pm
504 ${prV}/ExtUtils/Constant/Base.pm
505 ${prV}/ExtUtils/Constant/Utils.pm
506 ${prV}/ExtUtils/Constant/XS.pm
507 ${prV}/ExtUtils/Liblist/Kid.pm
508 ${prV}/ExtUtils/MakeMaker/bytes.pm
509 ${prV}/ExtUtils/MakeMaker/vmsish.pm
510 ${prV}/fields.pm
511 ${prV}/File/Basename.pm
512 ${prV}/File/Compare.pm
513 ${prV}/File/Copy.pm
514 ${prV}/File/Find.pm
515 ${prV}/FileHandle.pm
516 ${prV}/File/Path.pm
517 ${prV}/File/Spec.pm
518 ${prV}/File/Spec/Unix.pm
519 ${prV}/File/stat.pm
520 ${prV}/filetest.pm
521 ${prVA}/attrs.pm
522 ${prVA}/auto/attrs
523 ${prVA}/auto/Cwd/Cwd$(get_libname)
524 ${prVA}/auto/Data/Dumper/Dumper$(get_libname)
525 ${prVA}/auto/DynaLoader/dl_findfile.al
526 ${prVA}/auto/Fcntl/Fcntl$(get_libname)
527 ${prVA}/auto/File/Glob/Glob$(get_libname)
528 ${prVA}/auto/IO/IO$(get_libname)
529 ${prVA}/auto/POSIX/autosplit.ix
530 ${prVA}/auto/POSIX/fstat.al
531 ${prVA}/auto/POSIX/load_imports.al
532 ${prVA}/auto/POSIX/POSIX.bs
533 ${prVA}/auto/POSIX/POSIX$(get_libname)
534 ${prVA}/auto/POSIX/assert.al
535 ${prVA}/auto/POSIX/stat.al
536 ${prVA}/auto/POSIX/tmpfile.al
537 ${prVA}/auto/re/re$(get_libname)
538 ${prVA}/auto/Socket/Socket$(get_libname)
539 ${prVA}/auto/Storable/autosplit.ix
540 ${prVA}/auto/Storable/_retrieve.al
541 ${prVA}/auto/Storable/retrieve.al
542 ${prVA}/auto/Storable/Storable$(get_libname)
543 ${prVA}/auto/Storable/_store.al
544 ${prVA}/auto/Storable/store.al
545 ${prVA}/B/Deparse.pm
546 ${prVA}/B.pm
547 ${prVA}/Config.pm
548 ${prVA}/Config_heavy.pl
549 ${prVA}/CORE/libperl$(get_libname)
550 ${prVA}/Cwd.pm
551 ${prVA}/Data/Dumper.pm
552 ${prVA}/DynaLoader.pm
553 ${prVA}/encoding.pm
554 ${prVA}/Errno.pm
555 ${prVA}/Fcntl.pm
556 ${prVA}/File/Glob.pm
557 ${prVA}/_h2ph_pre.ph
558 ${prVA}/IO/File.pm
559 ${prVA}/IO/Handle.pm
560 ${prVA}/IO/Pipe.pm
561 ${prVA}/IO.pm
562 ${prVA}/IO/Seekable.pm
563 ${prVA}/IO/Select.pm
564 ${prVA}/IO/Socket.pm
565 ${prVA}/lib.pm
566 ${prVA}/NDBM_File.pm
567 ${prVA}/ops.pm
568 ${prVA}/POSIX.pm
569 ${prVA}/re.pm
570 ${prVA}/Socket.pm
571 ${prVA}/Storable.pm
572 ${prVA}/threads
573 ${prVA}/threads.pm
574 ${prVA}/XSLoader.pm
575 ${prV}/Getopt/Long.pm
576 ${prV}/Getopt/Std.pm
577 ${prV}/if.pm
578 ${prV}/integer.pm
579 ${prV}/IO/Socket/INET.pm
580 ${prV}/IO/Socket/UNIX.pm
581 ${prV}/IPC/Open2.pm
582 ${prV}/IPC/Open3.pm
583 ${prV}/less.pm
584 ${prV}/List/Util.pm
585 ${prV}/locale.pm
586 ${prV}/open.pm
587 ${prV}/overload.pm
588 ${prV}/Pod/InputObjects.pm
589 ${prV}/Pod/Man.pm
590 ${prV}/Pod/ParseLink.pm
591 ${prV}/Pod/Parser.pm
592 ${prV}/Pod/Select.pm
593 ${prV}/Pod/Text.pm
594 ${prV}/Pod/Usage.pm
595 ${prV}/PerlIO.pm
596 ${prV}/Scalar/Util.pm
597 ${prV}/SelectSaver.pm
598 ${prV}/sigtrap.pm
599 ${prV}/sort.pm
600 ${prV}/stat.pl
601 ${prV}/strict.pm
602 ${prV}/subs.pm
603 ${prV}/Symbol.pm
604 ${prV}/Text/ParseWords.pm
605 ${prV}/Text/Tabs.pm
606 ${prV}/Text/Wrap.pm
607 ${prV}/Time/Local.pm
608 ${prV}/unicore/Canonical.pl
609 ${prV}/unicore/Exact.pl
610 ${prV}/unicore/lib/gc_sc/Digit.pl
611 ${prV}/unicore/lib/gc_sc/Word.pl
612 ${prV}/unicore/PVA.pl
613 ${prV}/unicore/To/Fold.pl
614 ${prV}/unicore/To/Lower.pl
615 ${prV}/unicore/To/Upper.pl
616 ${prV}/utf8_heavy.pl
617 ${prV}/utf8.pm
618 ${prV}/vars.pm
619 ${prV}/vmsish.pm
620 ${prV}/warnings
621 ${prV}/warnings.pm
622 ${prV}/warnings/register.pm"
623
624 if use perlsuid ; then
625 MINIMAL_PERL_INSTALL="${MINIMAL_PERL_INSTALL}
626 ${bindir}/suidperl
627 ${bindir}/sperl${MY_PV}"
628 fi
629
630 pushd "${D}" > /dev/null
631 # Remove cruft
632 einfo "Removing files that are not in the minimal install"
633 echo "${MINIMAL_PERL_INSTALL}"
634 for f in $(find . -type f); do
635 has ${f} ${MINIMAL_PERL_INSTALL} || rm -f ${f}
636 done
637 # Remove empty directories
638 find . -depth -type d | xargs -r rmdir &> /dev/null
639 popd > /dev/null
640 }
641
642 pkg_postinst() {
643 INC=$(perl -e 'for $line (@INC) { next if $line eq "."; next if $line =~ m/'${MY_PV}'|etc|local|perl$/; print "$line\n" }')
644 if [[ "${ROOT}" = "/" ]]
645 then
646 ebegin "Removing old .ph files"
647 for DIR in $INC; do
648 if [[ -d "${ROOT}"/$DIR ]]; then
649 for file in $(find "${ROOT}"/$DIR -name "*.ph" -type f); do
650 rm "${ROOT}"/$file
651 einfo "<< $file"
652 done
653 fi
654 done
655 # Silently remove the now empty dirs
656 for DIR in $INC; do
657 if [[ -d "${ROOT}"/$DIR ]]; then
658 find "${ROOT}"/$DIR -depth -type d | xargs -r rmdir &> /dev/null
659 fi
660 done
661 ebegin "Generating ConfigLocal.pm (ignore any error)"
662 enc2xs -C
663 ebegin "Converting C header files to the corresponding Perl format"
664 cd /usr/include;
665 h2ph *
666 h2ph -r sys/* arpa/* netinet/* bits/* security/* asm/* gnu/* linux/* gentoo*
667 cd /usr/include/linux
668 h2ph *
669 fi
670
671 # This has been moved into a function because rumor has it that a future release
672 # of portage will allow us to check what version was just removed - which means
673 # we will be able to invoke this only as needed :)
674 # Tried doing this via -z, but $INC is too big...
675 if [[ "${INC}x" != "x" ]]; then
676 cleaner_msg
677 epause 5
678 fi
679 }
680
681 cleaner_msg() {
682 eerror "You have had multiple versions of perl. It is recommended"
683 eerror "that you run perl-cleaner now. perl-cleaner will"
684 eerror "assist with this transition. This script is capable"
685 eerror "of cleaning out old .ph files, rebuilding modules for "
686 eerror "your new version of perl, as well as re-emerging"
687 eerror "applications that compiled against your old libperl$(get_libname)"
688 eerror
689 eerror "PLEASE DO NOT INTERRUPT THE RUNNING OF THIS SCRIPT."
690 eerror "Part of the rebuilding of applications compiled against "
691 eerror "your old libperl involves temporarily unmerging"
692 eerror "them - interruptions could leave you with unmerged"
693 eerror "packages before they can be remerged."
694 eerror ""
695 eerror "If you have run perl-cleaner and a package still gives"
696 eerror "you trouble, and re-emerging it fails to correct"
697 eerror "the problem, please check http://bugs.gentoo.org/"
698 eerror "for more information or to report a bug."
699 eerror ""
700 eerror ""
701
702 }
703
704
705
706 --
707 gentoo-commits@l.g.o mailing list