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