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: perl-5.12.5.ebuild ChangeLog perl-5.16.2-r1.ebuild
Date: Mon, 04 Mar 2013 19:51:20
Message-Id: 20130304195115.9F7BE2171D@flycatcher.gentoo.org
1 tove 13/03/04 19:51:15
2
3 Modified: ChangeLog
4 Added: perl-5.12.5.ebuild perl-5.16.2-r1.ebuild
5 Log:
6 Bump. Fixes CVE-2013-1667 and adds subslots.
7
8 (Portage version: 2.2.0_alpha164/cvs/Linux x86_64, signed Manifest commit with key 0x5772769F4E046AEC)
9
10 Revision Changes Path
11 1.393 dev-lang/perl/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/perl/ChangeLog?rev=1.393&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/perl/ChangeLog?rev=1.393&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/perl/ChangeLog?r1=1.392&r2=1.393
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-lang/perl/ChangeLog,v
20 retrieving revision 1.392
21 retrieving revision 1.393
22 diff -u -r1.392 -r1.393
23 --- ChangeLog 18 Feb 2013 22:46:49 -0000 1.392
24 +++ ChangeLog 4 Mar 2013 19:51:15 -0000 1.393
25 @@ -1,6 +1,13 @@
26 # ChangeLog for dev-lang/perl
27 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/perl/ChangeLog,v 1.392 2013/02/18 22:46:49 zmedico Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/perl/ChangeLog,v 1.393 2013/03/04 19:51:15 tove Exp $
30 +
31 +*perl-5.16.2-r1 (04 Mar 2013)
32 +*perl-5.12.5 (04 Mar 2013)
33 +
34 + 04 Mar 2013; Torsten Veller <tove@g.o> +perl-5.12.5.ebuild,
35 + +files/perl-5.12.5-rehash-5.12.5.patch, +perl-5.16.2-r1.ebuild:
36 + Bump. Fixes CVE-2013-1667 and adds subslots.
37
38 18 Feb 2013; Zac Medico <zmedico@g.o> perl-5.16.2.ebuild:
39 Add ~arm-linux keyword.
40
41
42
43 1.1 dev-lang/perl/perl-5.12.5.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/perl/perl-5.12.5.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/perl/perl-5.12.5.ebuild?rev=1.1&content-type=text/plain
47
48 Index: perl-5.12.5.ebuild
49 ===================================================================
50 # Copyright 1999-2013 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/dev-lang/perl/perl-5.12.5.ebuild,v 1.1 2013/03/04 19:51:15 tove Exp $
53
54 EAPI=5
55
56 inherit eutils alternatives flag-o-matic toolchain-funcs multilib
57
58 PATCH_VER=1
59
60 PERL_OLDVERSEN="5.12.4 5.12.3 5.12.2 5.12.1 5.12.0"
61
62 SHORT_PV="${PV%.*}"
63 MY_P="perl-${PV/_rc/-RC}"
64 MY_PV="${PV%_rc*}"
65
66 DESCRIPTION="Larry Wall's Practical Extraction and Report Language"
67
68 SRC_URI="
69 mirror://cpan/src/${MY_P}.tar.bz2
70 mirror://cpan/authors/id/L/LB/LBROCARD/${MY_P}.tar.bz2
71 mirror://gentoo/${MY_P}-${PATCH_VER}.tar.bz2
72 http://dev.gentoo.org/~tove/distfiles/${CATEGORY}/${PN}/${MY_P}-${PATCH_VER}.tar.bz2"
73 # mirror://cpan/src/${MY_P}.tar.bz2
74 # mirror://gentoo/${MY_P}-${PATCH_VER}.tar.bz2
75 HOMEPAGE="http://www.perl.org/"
76
77 LICENSE="|| ( Artistic GPL-1 GPL-2 GPL-3 )"
78 SLOT="0/${SHORT_PV}"
79 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
80 IUSE="berkdb build debug doc gdbm ithreads"
81
82 COMMON_DEPEND="berkdb? ( sys-libs/db )
83 gdbm? ( >=sys-libs/gdbm-1.8.3 )
84 >=sys-devel/libperl-5.10.1
85 !!<sys-devel/libperl-5.10.1
86 app-arch/bzip2
87 sys-libs/zlib"
88 DEPEND="${COMMON_DEPEND}
89 !prefix? ( elibc_FreeBSD? ( sys-freebsd/freebsd-mk-defs ) )"
90 RDEPEND="${COMMON_DEPEND}"
91 PDEPEND=">=app-admin/perl-cleaner-2.5"
92
93 S="${WORKDIR}/${MY_P}"
94
95 dual_scripts() {
96 src_remove_dual_scripts perl-core/Archive-Tar 1.54 ptar ptardiff
97 src_remove_dual_scripts perl-core/Digest-SHA 5.47 shasum
98 src_remove_dual_scripts perl-core/CPAN 1.945.600 cpan
99 src_remove_dual_scripts perl-core/CPANPLUS 0.900.0 cpanp cpan2dist cpanp-run-perl
100 src_remove_dual_scripts perl-core/Encode 2.39 enc2xs piconv
101 src_remove_dual_scripts perl-core/ExtUtils-MakeMaker 6.56 instmodsh
102 src_remove_dual_scripts perl-core/ExtUtils-ParseXS 2.210.0 xsubpp
103 src_remove_dual_scripts perl-core/Module-Build 0.3603 config_data
104 src_remove_dual_scripts perl-core/Module-CoreList 2.770.0 corelist
105 src_remove_dual_scripts perl-core/PodParser 1.370.0 pod2usage podchecker podselect
106 src_remove_dual_scripts perl-core/Test-Harness 3.17 prove
107 src_remove_dual_scripts perl-core/podlators 2.3.1 pod2man pod2text
108 }
109
110 pkg_setup() {
111 case ${CHOST} in
112 *-freebsd*) osname="freebsd" ;;
113 *-dragonfly*) osname="dragonfly" ;;
114 *-netbsd*) osname="netbsd" ;;
115 *-openbsd*) osname="openbsd" ;;
116 *-darwin*) osname="darwin" ;;
117 *-interix*) osname="interix" ;;
118 *) osname="linux" ;;
119 esac
120
121 if use ithreads ; then
122 mythreading="-multi"
123 myarch="${CHOST%%-*}-${osname}-thread"
124 else
125 myarch="${CHOST%%-*}-${osname}"
126 fi
127 if use debug ; then
128 myarch="${myarch}-debug"
129 fi
130
131 LIBPERL="libperl$(get_libname ${MY_PV} )"
132 PRIV_LIB="/usr/$(get_libdir)/perl5/${MY_PV}"
133 ARCH_LIB="/usr/$(get_libdir)/perl5/${MY_PV}/${myarch}${mythreading}"
134 SITE_LIB="/usr/$(get_libdir)/perl5/site_perl/${MY_PV}"
135 SITE_ARCH="/usr/$(get_libdir)/perl5/site_perl/${MY_PV}/${myarch}${mythreading}"
136 VENDOR_LIB="/usr/$(get_libdir)/perl5/vendor_perl/${MY_PV}"
137 VENDOR_ARCH="/usr/$(get_libdir)/perl5/vendor_perl/${MY_PV}/${myarch}${mythreading}"
138
139 if use ithreads ; then
140 echo ""
141 ewarn "THREADS WARNING:"
142 ewarn "PLEASE NOTE: You are compiling ${MY_P} with"
143 ewarn "interpreter-level threading enabled."
144 ewarn "Threading is not supported by all applications "
145 ewarn "that compile against perl. You use threading at "
146 ewarn "your own discretion. "
147 fi
148 if has_version "<dev-lang/perl-${SHORT_PV}" ; then
149 echo ""
150 ewarn "UPDATE THE PERL MODULES:"
151 ewarn "After updating dev-lang/perl you must reinstall"
152 ewarn "the installed perl modules."
153 ewarn "Use: perl-cleaner --all"
154 elif has_version dev-lang/perl ; then
155 # doesnot work
156 #if ! has_version dev-lang/perl[ithreads=,debug=] ; then
157 #if ! has_version dev-lang/perl[ithreads=] || ! has_version dev-lang/perl[debug=] ; then
158 if ( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
159 ( ! use ithreads && has_version dev-lang/perl[ithreads] ) || \
160 ( use debug && ! has_version dev-lang/perl[debug] ) || \
161 ( ! use debug && has_version dev-lang/perl[debug] ) ; then
162 echo ""
163 ewarn "TOGGLED USE-FLAGS WARNING:"
164 ewarn "You changed one of the use-flags ithreads or debug."
165 ewarn "You must rebuild all perl-modules installed."
166 ewarn "Use: perl-cleaner --modules ; perl-cleaner --force --libperl"
167 fi
168 fi
169 dual_scripts
170 }
171
172 src_prepare_update_patchlevel_h() {
173 [[ -f ${WORKDIR}/perl-patch/series ]] || return 0
174
175 while read patch level ; do
176 sed -i -e "s/^\t,NULL$/ ,\"${patch//__/_}\"\n&/" "${S}"/patchlevel.h || die
177 done < "${WORKDIR}"/perl-patch/series
178 }
179
180 src_prepare() {
181 EPATCH_SOURCE="${WORKDIR}/perl-patch" \
182 EPATCH_SUFFIX="diff" \
183 EPATCH_FORCE="yes" \
184 EPATCH_OPTS="-p1" \
185 epatch
186
187 src_prepare_update_patchlevel_h
188
189 # pod/perltoc.pod fails
190 # lib/ExtUtils/t/Embed.t fails
191 if ! tc-is-static-only ; then
192 ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV})
193 ln -s ${LIBPERL} libperl$(get_libname )
194 fi
195
196 epatch \
197 "${FILESDIR}"/${PN}-5.12.3-aix-soname.patch \
198 "${FILESDIR}"/${PN}-5.8.8-solaris-relocation.patch \
199 "${FILESDIR}"/${PN}-5.8.8-solaris11.patch \
200 "${FILESDIR}"/${PN}-5.10.1-cleanup-paths.patch \
201 "${FILESDIR}"/${PN}-5.8.8-usr-local.patch \
202 "${FILESDIR}"/${PN}-5.10.1-hpux.patch \
203 "${FILESDIR}"/${PN}-5.8.8-darwin-cc-ld.patch \
204 "${FILESDIR}"/${PN}-5.12.3-mint.patch \
205 "${FILESDIR}"/${PN}-5.12.3-interix.patch \
206 "${FILESDIR}"/${PN}-5.12.5-rehash-5.12.5.patch
207
208
209 # Fix build on OSX Lion (10.7)
210 sed -i -e '/^usenm=/s/true/false/' hints/darwin.sh
211
212 # rest of usr-local patch
213 sed -i \
214 -e '/^locincpth=/c\locincpth=""' \
215 -e '/^loclibpth=/c\loclibpth=""' \
216 -e '/^glibpth=.*\/local\//s: /usr/local/lib.*":":' \
217 Configure || die
218 }
219
220 myconf() {
221 # the myconf array is declared in src_configure
222 myconf=( "${myconf[@]}" "$@" )
223 }
224
225 src_configure() {
226 declare -a myconf
227
228 export LC_ALL="C"
229 [[ ${COLUMNS:-1} -ge 1 ]] || unset COLUMNS # bug #394091
230
231 # some arches and -O do not mix :)
232 use ppc && replace-flags -O? -O1
233 # Perl has problems compiling with -Os in your flags with glibc
234 use elibc_uclibc || replace-flags "-Os" "-O2"
235 # This flag makes compiling crash in interesting ways
236 filter-flags "-malign-double"
237 # Fixes bug #97645
238 use ppc && filter-flags "-mpowerpc-gpopt"
239 # Fixes bug #143895 on gcc-4.1.1
240 filter-flags "-fsched2-use-superblocks"
241
242 use sparc && myconf -Ud_longdbl
243
244 # 266337
245 export BUILD_BZIP2=0
246 export BZIP2_INCLUDE=${EPREFIX}/usr/include
247 export BZIP2_LIB=${EPREFIX}/usr/$(get_libdir)
248 cat <<-EOF > "${S}/cpan/Compress-Raw-Zlib/config.in"
249 BUILD_ZLIB = False
250 INCLUDE = ${EPREFIX}/usr/include
251 LIB = ${EPREFIX}/usr/$(get_libdir)
252
253 OLD_ZLIB = False
254 GZIP_OS_CODE = AUTO_DETECT
255 EOF
256
257 # allow either gdbm to provide ndbm (in <gdbm/ndbm.h>) or db1
258
259 myndbm='U'
260 mygdbm='U'
261 mydb='U'
262
263 if use gdbm ; then
264 mygdbm='D'
265 myndbm='D'
266 fi
267 if use berkdb ; then
268 mydb='D'
269 has_version '=sys-libs/db-1*' && myndbm='D'
270 fi
271
272 myconf "-${myndbm}i_ndbm" "-${mygdbm}i_gdbm" "-${mydb}i_db"
273
274 if use alpha && [[ "$(tc-getCC)" = "ccc" ]] ; then
275 ewarn "Perl will not be built with berkdb support, use gcc if you needed it..."
276 myconf -Ui_db -Ui_ndbm
277 fi
278
279 use ithreads && myconf -Dusethreads
280
281 if use debug ; then
282 append-cflags "-g"
283 myconf -DDEBUGGING
284 elif [[ ${CFLAGS} == *-g* ]] ; then
285 myconf -DDEBUGGING=-g
286 else
287 myconf -DDEBUGGING=none
288 fi
289
290 if [[ -n ${PERL_OLDVERSEN} ]] ; then
291 local inclist=$(for v in ${PERL_OLDVERSEN}; do echo -n "${v}/${myarch}${mythreading} ${v} "; done )
292 myconf -Dinc_version_list="$inclist"
293 fi
294
295 [[ ${ELIBC} == "FreeBSD" ]] && myconf "-Dlibc=/usr/$(get_libdir)/libc.a"
296
297 # Prefix: the host system needs not to follow Gentoo multilib stuff, and in
298 # Prefix itself we don't do multilib either, so make sure perl can find
299 # something compatible.
300 if use prefix ; then
301 local ldir
302 local llib
303 local paths=""
304 echo "int main() {}" > "${T}"/t.c
305 # need to ensure dirs contain compatible libs, bug #358875
306 for ldir in /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 /lib /usr/lib ; do
307 [[ -d ${ldir} ]] || continue
308 # look for libc, which should be somewhere
309 llib=${ldir}/libc$(get_libname)
310 [[ -e ${llib} ]] || continue
311 if $(tc-getCC) -o "${T}"/t "${T}"/t.c ${llib} >& /dev/null ; then
312 ldir=${ldir#/usr}
313 paths="${ldir} /usr${ldir}"
314 break
315 fi
316 done
317 myconf "-Dlibpth=${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir) ${paths:-/lib /usr/lib}"
318 elif [[ $(get_libdir) != "lib" ]] ; then
319 # We need to use " and not ', as the written config.sh use ' ...
320 myconf "-Dlibpth=/usr/local/$(get_libdir) /$(get_libdir) /usr/$(get_libdir)"
321 fi
322
323 # don't try building ODBM, bug #354453
324 myconf -Dnoextensions=ODBM_File
325
326 sh Configure \
327 -des \
328 -Duseshrplib \
329 -Darchname="${myarch}" \
330 -Dcc="$(tc-getCC)" \
331 -Doptimize="${CFLAGS}" \
332 -Dldflags="${LDFLAGS}" \
333 -Dprefix="${EPREFIX}"'/usr' \
334 -Dinstallprefix="${EPREFIX}"'/usr' \
335 -Dsiteprefix="${EPREFIX}"'/usr' \
336 -Dvendorprefix="${EPREFIX}"'/usr' \
337 -Dscriptdir="${EPREFIX}"'/usr/bin' \
338 -Dprivlib="${EPREFIX}${PRIV_LIB}" \
339 -Darchlib="${EPREFIX}${ARCH_LIB}" \
340 -Dsitelib="${EPREFIX}${SITE_LIB}" \
341 -Dsitearch="${EPREFIX}${SITE_ARCH}" \
342 -Dvendorlib="${EPREFIX}${VENDOR_LIB}" \
343 -Dvendorarch="${EPREFIX}${VENDOR_ARCH}" \
344 -Dman1dir="${EPREFIX}"/usr/share/man/man1 \
345 -Dman3dir="${EPREFIX}"/usr/share/man/man3 \
346 -Dsiteman1dir="${EPREFIX}"/usr/share/man/man1 \
347 -Dsiteman3dir="${EPREFIX}"/usr/share/man/man3 \
348 -Dvendorman1dir="${EPREFIX}"/usr/share/man/man1 \
349 -Dvendorman3dir="${EPREFIX}"/usr/share/man/man3 \
350 -Dman1ext='1' \
351 -Dman3ext='3pm' \
352 -Dlibperl="${LIBPERL}" \
353 -Dlocincpth="${EPREFIX}"'/usr/include ' \
354 -Dglibpth="${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir)"' ' \
355 -Duselargefiles \
356 -Dd_semctl_semun \
357 -Dcf_by='Gentoo' \
358 -Dmyhostname='localhost' \
359 -Dperladmin='root@localhost' \
360 -Dinstallusrbinperl='n' \
361 -Ud_csh \
362 -Uusenm \
363 "${myconf[@]}" || die "Unable to configure"
364 }
365
366 src_compile() {
367 # bug 331113
368 emake -j1 || die "emake failed"
369 }
370
371 src_test() {
372 if [[ ${EUID} == 0 ]] ; then
373 ewarn "Test fails with a sandbox error (#328793) if run as root. Skipping tests..."
374 return 0
375 fi
376 use elibc_uclibc && export MAKEOPTS+=" -j1"
377 TEST_JOBS=$(echo -j1 ${MAKEOPTS} | sed -r 's/.*(-j[[:space:]]*|--jobs=)([[:digit:]]+).*/\2/' ) \
378 make test_harness || die "test failed"
379 }
380
381 src_install() {
382 local i
383 local coredir="${ARCH_LIB}/CORE"
384
385 # # Fix for "stupid" modules and programs
386 # dodir ${SITE_ARCH} ${SITE_LIB}
387 # keepdir "${VENDOR_ARCH}" #338802 for enc2xs
388
389 local installtarget=install
390 if use build ; then
391 installtarget=install.perl
392 fi
393 make DESTDIR="${D}" ${installtarget} || die "Unable to make ${installtarget}"
394
395 rm -f "${ED}"/usr/bin/perl
396 ln -s perl${MY_PV} "${ED}"/usr/bin/perl
397
398 if ! tc-is-static-only ; then
399 dolib.so "${ED}"/${coredir}/${LIBPERL} || die
400 dosym ${LIBPERL} /usr/$(get_libdir)/libperl$(get_libname ${SHORT_PV}) || die
401 dosym ${LIBPERL} /usr/$(get_libdir)/libperl$(get_libname) || die
402 rm -f "${ED}"/${coredir}/${LIBPERL}
403 dosym ../../../../../$(get_libdir)/${LIBPERL} ${coredir}/${LIBPERL}
404 dosym ../../../../../$(get_libdir)/${LIBPERL} ${coredir}/libperl$(get_libname ${SHORT_PV})
405 dosym ../../../../../$(get_libdir)/${LIBPERL} ${coredir}/libperl$(get_libname)
406 fi
407
408 rm -rf "${ED}"/usr/share/man/man3 || die "Unable to remove module man pages"
409
410 # # A poor fix for the miniperl issues
411 # dosed 's:./miniperl:/usr/bin/perl:' /usr/$(get_libdir)/perl5/${MY_PV}/ExtUtils/xsubpp
412 # fperms 0444 /usr/$(get_libdir)/perl5/${MY_PV}/ExtUtils/xsubpp
413 # dosed 's:./miniperl:/usr/bin/perl:' /usr/bin/xsubpp
414 # fperms 0755 /usr/bin/xsubpp
415
416 # This removes ${D} from Config.pm
417 for i in $(find "${D}" -iname "Config.pm" ) ; do
418 einfo "Removing ${D} from ${i}..."
419 sed -i -e "s:${D}::" "${i}" || die "Sed failed"
420 done
421
422 find "${ED}" -type f -name .packlist -delete || die
423
424 # Note: find out from psm why we would need/want this.
425 # ( use berkdb && has_version '=sys-libs/db-1*' ) ||
426 # find "${ED}" -name "*NDBM*" | xargs rm -f
427
428 dodoc Changes* README AUTHORS || die
429
430 if use doc ; then
431 # HTML Documentation
432 # We expect errors, warnings, and such with the following.
433
434 dodir /usr/share/doc/${PF}/html
435 LD_LIBRARY_PATH=. ./perl installhtml \
436 --podroot='.' \
437 --podpath='lib:ext:pod:vms' \
438 --recurse \
439 --htmldir="${ED}/usr/share/doc/${PF}/html" \
440 --libpods='perlfunc:perlguts:perlvar:perlrun:perlop'
441 fi
442
443 if use build ; then
444 src_remove_extra_files
445 fi
446
447 dual_scripts
448 }
449
450 pkg_postinst() {
451 dual_scripts
452
453 if [[ "${ROOT}" = "/" ]] ; then
454 local INC DIR file
455 INC=$(perl -e 'for $line (@INC) { next if $line eq "."; next if $line =~ m/'${MY_PV}'|etc|local|perl$/; print "$line\n" }')
456 einfo "Removing old .ph files"
457 for DIR in ${INC} ; do
458 if [[ -d "${DIR}" ]] ; then
459 for file in $(find "${DIR}" -name "*.ph" -type f ) ; do
460 rm -f "${file}"
461 einfo "<< ${file}"
462 done
463 fi
464 done
465 # Silently remove the now empty dirs
466 for DIR in ${INC} ; do
467 if [[ -d "${DIR}" ]] ; then
468 find "${DIR}" -depth -type d -print0 | xargs -0 -r rmdir &> /dev/null
469 fi
470 done
471 if ! use build ; then
472 ebegin "Generating ConfigLocal.pm (ignore any error)"
473 enc2xs -C
474 fi
475
476 einfo "Converting C header files to the corresponding Perl format (ignore any error)"
477 # Prefix note: unprefixed as this is all kernel/libc stuff that we never provide
478 pushd /usr/include >/dev/null
479 h2ph -Q -a -d "${EPREFIX}"${ARCH_LIB} \
480 asm/termios.h syscall.h syslimits.h syslog.h sys/ioctl.h \
481 sys/socket.h sys/time.h wait.h sysexits.h
482 popd >/dev/null
483
484 # This has been moved into a function because rumor has it that a future release
485 # of portage will allow us to check what version was just removed - which means
486 # we will be able to invoke this only as needed :)
487 # Tried doing this via -z, but $INC is too big...
488 #if [[ "${INC}x" != "x" ]]; then
489 # cleaner_msg
490 #fi
491 fi
492 }
493
494 pkg_postrm(){
495 dual_scripts
496
497 # if [[ -e ${ARCH_LIB}/Encode/ConfigLocal.pm ]] ; then
498 # ebegin "Removing ConfigLocal.pm"
499 # rm "${ARCH_LIB}/Encode/ConfigLocal.pm"
500 # fi
501 }
502
503 cleaner_msg() {
504 eerror "You have had multiple versions of perl. It is recommended"
505 eerror "that you run perl-cleaner now. perl-cleaner will"
506 eerror "assist with this transition. This script is capable"
507 eerror "of cleaning out old .ph files, rebuilding modules for "
508 eerror "your new version of perl, as well as re-emerging"
509 eerror "applications that compiled against your old libperl$(get_libname)"
510 eerror
511 eerror "PLEASE DO NOT INTERRUPT THE RUNNING OF THIS SCRIPT."
512 eerror "Part of the rebuilding of applications compiled against "
513 eerror "your old libperl involves temporarily unmerging"
514 eerror "them - interruptions could leave you with unmerged"
515 eerror "packages before they can be remerged."
516 eerror ""
517 eerror "If you have run perl-cleaner and a package still gives"
518 eerror "you trouble, and re-emerging it fails to correct"
519 eerror "the problem, please check http://bugs.gentoo.org/"
520 eerror "for more information or to report a bug."
521 eerror ""
522 }
523
524 src_remove_dual_scripts() {
525
526 local i pkg ver ff
527 pkg="$1"
528 ver="$2"
529 shift 2
530 if has "${EBUILD_PHASE:-none}" "postinst" "postrm" ;then
531 for i in "$@" ; do
532 alternatives_auto_makesym "/usr/bin/${i}" "/usr/bin/${i}-[0-9]*"
533 if [[ ${i} != cpanp-run-perl ]] ; then
534 ff=`echo ${EROOT}/usr/share/man/man1/${i}-${ver}-${P}.1*`
535 ff=${ff##*.1}
536 alternatives_auto_makesym "/usr/share/man/man1/${i}.1${ff}" "/usr/share/man/man1/${i}-[0-9]*"
537 fi
538 done
539 elif has "${EBUILD_PHASE:-none}" "setup" ; then
540 for i in "$@" ; do
541 if [[ -f ${EROOT}/usr/bin/${i} && ! -h ${EROOT}/usr/bin/${i} ]] ; then
542 has_version ${pkg} && ewarn "You must reinstall $pkg !"
543 break
544 fi
545 done
546 else
547 for i in "$@" ; do
548 if ! [[ -f "${ED}"/usr/bin/${i} ]] ; then
549 use build || ewarn "/usr/bin/${i} does not exist!"
550 continue
551 fi
552 mv "${ED}"/usr/bin/${i}{,-${ver}-${P}} || die
553 if [[ -f ${ED}/usr/share/man/man1/${i}.1 ]] ; then
554 mv "${ED}"/usr/share/man/man1/${i}{.1,-${ver}-${P}.1} || die
555 else
556 echo "/usr/share/man/man1/${i}.1 does not exist!"
557 fi
558 done
559 fi
560 }
561
562 src_remove_extra_files() {
563 local prefix="./usr" # ./ is important
564 local bindir="${prefix}/bin"
565 local libdir="${prefix}/$(get_libdir)"
566
567 # I made this list from the Mandr*, Debian and ex-Connectiva perl-base list
568 # Then, I added several files to get GNU autotools running
569 # FIXME: should this be in a separated file to be sourced?
570 local MINIMAL_PERL_INSTALL="
571 ${bindir}/h2ph
572 ${bindir}/perl
573 ${bindir}/perl${MY_PV}
574 ${bindir}/pod2man
575 ${libdir}/${LIBPERL}
576 ${libdir}/libperl$(get_libname)
577 ${libdir}/libperl$(get_libname ${SHORT_PV})
578 .${PRIV_LIB}/AutoLoader.pm
579 .${PRIV_LIB}/B/Deparse.pm
580 .${PRIV_LIB}/Carp.pm
581 .${PRIV_LIB}/Carp/Heavy.pm
582 .${PRIV_LIB}/Class/Struct.pm
583 .${PRIV_LIB}/DirHandle.pm
584 .${PRIV_LIB}/Exporter.pm
585 .${PRIV_LIB}/Exporter/Heavy.pm
586 .${PRIV_LIB}/ExtUtils/Command.pm
587 .${PRIV_LIB}/ExtUtils/Command/MM.pm
588 .${PRIV_LIB}/ExtUtils/Constant.pm
589 .${PRIV_LIB}/ExtUtils/Constant/Base.pm
590 .${PRIV_LIB}/ExtUtils/Constant/Utils.pm
591 .${PRIV_LIB}/ExtUtils/Constant/XS.pm
592 .${PRIV_LIB}/ExtUtils/Embed.pm
593 .${PRIV_LIB}/ExtUtils/Install.pm
594 .${PRIV_LIB}/ExtUtils/Installed.pm
595 .${PRIV_LIB}/ExtUtils/Liblist.pm
596 .${PRIV_LIB}/ExtUtils/Liblist/Kid.pm
597 .${PRIV_LIB}/ExtUtils/MM.pm
598 .${PRIV_LIB}/ExtUtils/MM_Any.pm
599 .${PRIV_LIB}/ExtUtils/MM_MacOS.pm
600 .${PRIV_LIB}/ExtUtils/MM_Unix.pm
601 .${PRIV_LIB}/ExtUtils/MY.pm
602 .${PRIV_LIB}/ExtUtils/MakeMaker.pm
603 .${PRIV_LIB}/ExtUtils/Manifest.pm
604 .${PRIV_LIB}/ExtUtils/Miniperl.pm
605 .${PRIV_LIB}/ExtUtils/Mkbootstrap.pm
606 .${PRIV_LIB}/ExtUtils/Mksymlists.pm
607 .${PRIV_LIB}/ExtUtils/Packlist.pm
608 .${PRIV_LIB}/ExtUtils/testlib.pm
609 .${PRIV_LIB}/File/Basename.pm
610 .${PRIV_LIB}/File/Compare.pm
611 .${PRIV_LIB}/File/Copy.pm
612 .${PRIV_LIB}/File/Find.pm
613 .${PRIV_LIB}/File/Path.pm
614 .${PRIV_LIB}/File/stat.pm
615 .${PRIV_LIB}/FileHandle.pm
616 .${PRIV_LIB}/Getopt/Long.pm
617 .${PRIV_LIB}/Getopt/Std.pm
618 .${PRIV_LIB}/IPC/Open2.pm
619 .${PRIV_LIB}/IPC/Open3.pm
620 .${PRIV_LIB}/PerlIO.pm
621 .${PRIV_LIB}/Pod/InputObjects.pm
622 .${PRIV_LIB}/Pod/Man.pm
623 .${PRIV_LIB}/Pod/ParseLink.pm
624 .${PRIV_LIB}/Pod/Parser.pm
625 .${PRIV_LIB}/Pod/Select.pm
626 .${PRIV_LIB}/Pod/Text.pm
627 .${PRIV_LIB}/Pod/Usage.pm
628 .${PRIV_LIB}/SelectSaver.pm
629 .${PRIV_LIB}/Symbol.pm
630 .${PRIV_LIB}/Text/ParseWords.pm
631 .${PRIV_LIB}/Text/Tabs.pm
632 .${PRIV_LIB}/Text/Wrap.pm
633 .${PRIV_LIB}/Tie/Hash.pm
634 .${PRIV_LIB}/Time/Local.pm
635 .${PRIV_LIB}/XSLoader.pm
636 .${PRIV_LIB}/autouse.pm
637 .${PRIV_LIB}/base.pm
638 .${PRIV_LIB}/bigint.pm
639 .${PRIV_LIB}/bignum.pm
640 .${PRIV_LIB}/bigrat.pm
641 .${PRIV_LIB}/blib.pm
642 .${PRIV_LIB}/bytes.pm
643 .${PRIV_LIB}/bytes_heavy.pl
644 .${PRIV_LIB}/charnames.pm
645 .${PRIV_LIB}/constant.pm
646 .${PRIV_LIB}/diagnostics.pm
647 .${PRIV_LIB}/fields.pm
648 .${PRIV_LIB}/filetest.pm
649 .${PRIV_LIB}/if.pm
650 .${PRIV_LIB}/integer.pm
651 .${PRIV_LIB}/less.pm
652 .${PRIV_LIB}/locale.pm
653 .${PRIV_LIB}/open.pm
654 .${PRIV_LIB}/overload.pm
655 .${PRIV_LIB}/sigtrap.pm
656 .${PRIV_LIB}/sort.pm
657 .${PRIV_LIB}/stat.pl
658 .${PRIV_LIB}/strict.pm
659 .${PRIV_LIB}/subs.pm
660 .${PRIV_LIB}/unicore/To/Fold.pl
661 .${PRIV_LIB}/unicore/To/Lower.pl
662 .${PRIV_LIB}/unicore/To/Upper.pl
663 .${PRIV_LIB}/utf8.pm
664 .${PRIV_LIB}/utf8_heavy.pl
665 .${PRIV_LIB}/vars.pm
666 .${PRIV_LIB}/vmsish.pm
667 .${PRIV_LIB}/warnings
668 .${PRIV_LIB}/warnings.pm
669 .${PRIV_LIB}/warnings/register.pm
670 .${ARCH_LIB}/B.pm
671 .${ARCH_LIB}/CORE/libperl$(get_libname)
672 .${ARCH_LIB}/Config.pm
673 .${ARCH_LIB}/Config_heavy.pl
674 .${ARCH_LIB}/Cwd.pm
675 .${ARCH_LIB}/Data/Dumper.pm
676 .${ARCH_LIB}/DynaLoader.pm
677 .${ARCH_LIB}/Errno.pm
678 .${ARCH_LIB}/Fcntl.pm
679 .${ARCH_LIB}/File/Glob.pm
680 .${ARCH_LIB}/File/Spec.pm
681 .${ARCH_LIB}/File/Spec/Unix.pm
682 .${ARCH_LIB}/IO.pm
683 .${ARCH_LIB}/IO/File.pm
684 .${ARCH_LIB}/IO/Handle.pm
685 .${ARCH_LIB}/IO/Pipe.pm
686 .${ARCH_LIB}/IO/Seekable.pm
687 .${ARCH_LIB}/IO/Select.pm
688 .${ARCH_LIB}/IO/Socket.pm
689 .${ARCH_LIB}/IO/Socket/INET.pm
690 .${ARCH_LIB}/IO/Socket/UNIX.pm
691 .${ARCH_LIB}/List/Util.pm
692 .${ARCH_LIB}/NDBM_File.pm
693 .${ARCH_LIB}/POSIX.pm
694 .${ARCH_LIB}/Scalar/Util.pm
695 .${ARCH_LIB}/Socket.pm
696 .${ARCH_LIB}/Storable.pm
697 .${ARCH_LIB}/attributes.pm
698 .${ARCH_LIB}/auto/Cwd/Cwd$(get_libname)
699 .${ARCH_LIB}/auto/Data/Dumper/Dumper$(get_libname)
700 .${ARCH_LIB}/auto/DynaLoader/dl_findfile.al
701 .${ARCH_LIB}/auto/Fcntl/Fcntl$(get_libname)
702 .${ARCH_LIB}/auto/File/Glob/Glob$(get_libname)
703 .${ARCH_LIB}/auto/IO/IO$(get_libname)
704 .${ARCH_LIB}/auto/POSIX/POSIX$(get_libname)
705 .${ARCH_LIB}/auto/POSIX/autosplit.ix
706 .${ARCH_LIB}/auto/POSIX/fstat.al
707 .${ARCH_LIB}/auto/POSIX/load_imports.al
708 .${ARCH_LIB}/auto/POSIX/stat.al
709 .${ARCH_LIB}/auto/POSIX/tmpfile.al
710 .${ARCH_LIB}/auto/Socket/Socket$(get_libname)
711 .${ARCH_LIB}/auto/Storable/Storable$(get_libname)
712 .${ARCH_LIB}/auto/Storable/_retrieve.al
713 .${ARCH_LIB}/auto/Storable/_store.al
714 .${ARCH_LIB}/auto/Storable/autosplit.ix
715 .${ARCH_LIB}/auto/Storable/retrieve.al
716 .${ARCH_LIB}/auto/Storable/store.al
717 .${ARCH_LIB}/auto/re/re$(get_libname)
718 .${ARCH_LIB}/encoding.pm
719 .${ARCH_LIB}/lib.pm
720 .${ARCH_LIB}/ops.pm
721 .${ARCH_LIB}/re.pm
722 .${ARCH_LIB}/threads.pm
723 "
724
725 pushd "${ED}" > /dev/null
726 # Remove cruft
727 einfo "Removing files that are not in the minimal install"
728 echo "${MINIMAL_PERL_INSTALL}"
729 for f in $(find . -type f ) ; do
730 has "${f}" ${MINIMAL_PERL_INSTALL} || rm -f "${f}"
731 done
732 # Remove empty directories
733 find . -depth -type d -print0 | xargs -0 -r rmdir &> /dev/null
734 #for f in ${MINIMAL_PERL_INSTALL} ; do
735 # [[ -e $f ]] || ewarn "$f unused in MINIMAL_PERL_INSTALL"
736 #done
737 popd > /dev/null
738 }
739
740
741
742 1.1 dev-lang/perl/perl-5.16.2-r1.ebuild
743
744 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/perl/perl-5.16.2-r1.ebuild?rev=1.1&view=markup
745 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/perl/perl-5.16.2-r1.ebuild?rev=1.1&content-type=text/plain
746
747 Index: perl-5.16.2-r1.ebuild
748 ===================================================================
749 # Copyright 1999-2013 Gentoo Foundation
750 # Distributed under the terms of the GNU General Public License v2
751 # $Header: /var/cvsroot/gentoo-x86/dev-lang/perl/perl-5.16.2-r1.ebuild,v 1.1 2013/03/04 19:51:15 tove Exp $
752
753 EAPI=5
754
755 inherit eutils alternatives flag-o-matic toolchain-funcs multilib multiprocessing
756
757 PATCH_VER=3
758
759 PERL_OLDVERSEN="5.16.1 5.16.0"
760 MODULE_AUTHOR=RJBS
761
762 SHORT_PV="${PV%.*}"
763 MY_P="perl-${PV/_rc/-RC}"
764 MY_PV="${PV%_rc*}"
765
766 DESCRIPTION="Larry Wall's Practical Extraction and Report Language"
767
768 SRC_URI="
769 mirror://cpan/src/${MY_P}.tar.bz2
770 mirror://cpan/authors/id/${MODULE_AUTHOR:0:1}/${MODULE_AUTHOR:0:2}/${MODULE_AUTHOR}/${MY_P}.tar.bz2
771 mirror://gentoo/${MY_P}-${PATCH_VER}.tar.bz2
772 http://dev.gentoo.org/~tove/distfiles/${CATEGORY}/${PN}/${MY_P}-${PATCH_VER}.tar.bz2
773 "
774 HOMEPAGE="http://www.perl.org/"
775
776 LICENSE="|| ( Artistic GPL-1+ )"
777 SLOT="0/${SHORT_PV}"
778 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
779 IUSE="berkdb build debug doc gdbm ithreads"
780
781 RDEPEND="
782 berkdb? ( sys-libs/db )
783 gdbm? ( >=sys-libs/gdbm-1.8.3 )
784 app-arch/bzip2
785 sys-libs/zlib
786 "
787 DEPEND="${RDEPEND}
788 !prefix? ( elibc_FreeBSD? ( sys-freebsd/freebsd-mk-defs ) )
789 "
790 PDEPEND=">=app-admin/perl-cleaner-2.5"
791
792 S="${WORKDIR}/${MY_P}"
793
794 dual_scripts() {
795 src_remove_dual perl-core/Archive-Tar 1.820.0 ptar ptardiff ptargrep
796 src_remove_dual perl-core/Digest-SHA 5.710.0 shasum
797 src_remove_dual perl-core/CPAN 1.980.0 cpan
798 src_remove_dual perl-core/CPANPLUS 0.912.100 cpanp cpan2dist
799 src_remove_dual_file perl-core/CPANPLUS 0.912.100 /usr/bin/cpanp-run-perl
800 src_remove_dual perl-core/Encode 2.440.0 enc2xs piconv
801 src_remove_dual perl-core/ExtUtils-MakeMaker 6.630.200_rc instmodsh
802 src_remove_dual perl-core/ExtUtils-ParseXS 3.160.0 xsubpp
803 src_remove_dual perl-core/IO-Compress 2.48.0 zipdetails
804 src_remove_dual perl-core/JSON-PP 2.272.0 json_pp
805 src_remove_dual perl-core/Module-Build 0.390.100_rc config_data
806 src_remove_dual perl-core/Module-CoreList 2.760.0 corelist
807 src_remove_dual perl-core/PodParser 1.510.0 pod2usage podchecker podselect
808 src_remove_dual perl-core/Pod-Perldoc 1.170.0 perldoc
809 src_remove_dual perl-core/Test-Harness 3.230.0 prove
810 src_remove_dual perl-core/podlators 2.4.0 pod2man pod2text
811 src_remove_dual_man perl-core/podlators 2.4.0 /usr/share/man/man1/perlpodstyle.1
812 }
813
814 # eblit-include [--skip] <function> [version]
815 eblit-include() {
816 local skipable=false
817 [[ $1 == "--skip" ]] && skipable=true && shift
818 [[ $1 == pkg_* ]] && skipable=true
819
820 local e v func=$1 ver=$2
821 [[ -z ${func} ]] && die "Usage: eblit-include <function> [version]"
822 for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
823 e="${FILESDIR}/eblits/${func}${v}.eblit"
824 if [[ -e ${e} ]] ; then
825 . "${e}"
826 return 0
827 fi
828 done
829 ${skipable} && return 0
830 die "Could not locate requested eblit '${func}' in ${FILESDIR}/eblits/"
831 }
832
833 # eblit-run-maybe <function>
834 # run the specified function if it is defined
835 eblit-run-maybe() {
836 [[ $(type -t "$@") == "function" ]] && "$@"
837 }
838
839 # eblit-run <function> [version]
840 # aka: src_unpack() { eblit-run src_unpack ; }
841 eblit-run() {
842 eblit-include --skip common "${*:2}"
843 eblit-include "$@"
844 eblit-run-maybe eblit-$1-pre
845 eblit-${PN}-$1
846 eblit-run-maybe eblit-$1-post
847 }
848
849 #src_unpack() { eblit-run src_unpack v50160001 ; }
850 src_prepare() { eblit-run src_prepare v50160001 ; }
851 src_configure() { eblit-run src_configure v50160001 ; }
852 #src_compile() { eblit-run src_compile v50160001 ; }
853 src_test() { eblit-run src_test v50160001 ; }
854 src_install() { eblit-run src_install v50160001 ; }
855
856 # FILESDIR might not be available during binpkg install
857 # FIXME: version passing
858 for x in setup {pre,post}{inst,rm} ; do
859 e="${FILESDIR}/eblits/pkg_${x}-v50160001.eblit"
860 if [[ -e ${e} ]] ; then
861 . "${e}"
862 eval "pkg_${x}() { eblit-run pkg_${x} v50160001 ; }"
863 fi
864 done