/[gentoo-x86]/dev-lang/perl/perl-5.12.4-r2.ebuild
Gentoo

Contents of /dev-lang/perl/perl-5.12.4-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Sun Jun 29 14:35:29 2014 UTC (3 months ago) by dilfridge
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Remove old

(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 84AD142F)

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

  ViewVC Help
Powered by ViewVC 1.1.20