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