1 |
tove 12/06/05 17:52:35 |
2 |
|
3 |
Added: pkg_postrm-v50160001.eblit common-v50160001.eblit |
4 |
src_configure-v50160001.eblit |
5 |
src_test-v50160001.eblit pkg_setup-v50160001.eblit |
6 |
src_install-v50160001.eblit |
7 |
pkg_postinst-v50160001.eblit |
8 |
src_prepare-v50160001.eblit |
9 |
Log: |
10 |
Version bump |
11 |
|
12 |
(Portage version: 2.2.0_alpha110/cvs/Linux x86_64) |
13 |
|
14 |
Revision Changes Path |
15 |
1.1 dev-lang/perl/files/eblits/pkg_postrm-v50160001.eblit |
16 |
|
17 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/perl/files/eblits/pkg_postrm-v50160001.eblit?rev=1.1&view=markup |
18 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/perl/files/eblits/pkg_postrm-v50160001.eblit?rev=1.1&content-type=text/plain |
19 |
|
20 |
Index: pkg_postrm-v50160001.eblit |
21 |
=================================================================== |
22 |
# Copyright 1999-2012 Gentoo Foundation |
23 |
# Distributed under the terms of the GNU General Public License v2 |
24 |
# $Header: /var/cvsroot/gentoo-x86/dev-lang/perl/files/eblits/pkg_postrm-v50160001.eblit,v 1.1 2012/06/05 17:52:35 tove Exp $ |
25 |
|
26 |
eblit-perl-pkg_postrm(){ |
27 |
dual_scripts |
28 |
|
29 |
# if [[ -e ${ARCH_LIB}/Encode/ConfigLocal.pm ]] ; then |
30 |
# ebegin "Removing ConfigLocal.pm" |
31 |
# rm "${ARCH_LIB}/Encode/ConfigLocal.pm" |
32 |
# fi |
33 |
} |
34 |
|
35 |
|
36 |
|
37 |
1.1 dev-lang/perl/files/eblits/common-v50160001.eblit |
38 |
|
39 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/perl/files/eblits/common-v50160001.eblit?rev=1.1&view=markup |
40 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/perl/files/eblits/common-v50160001.eblit?rev=1.1&content-type=text/plain |
41 |
|
42 |
Index: common-v50160001.eblit |
43 |
=================================================================== |
44 |
# Copyright 1999-2012 Gentoo Foundation |
45 |
# Distributed under the terms of the GNU General Public License v2 |
46 |
# $Header: /var/cvsroot/gentoo-x86/dev-lang/perl/files/eblits/common-v50160001.eblit,v 1.1 2012/06/05 17:52:35 tove Exp $ |
47 |
|
48 |
src_remove_dual_file() { |
49 |
local i pkg ver |
50 |
pkg="$1" |
51 |
ver="$2" |
52 |
shift 2 |
53 |
case "${EBUILD_PHASE:-none}" in |
54 |
postinst|postrm) |
55 |
for i in "$@" ; do |
56 |
alternatives_auto_makesym "${i}" "${i}-[0-9]*" |
57 |
done |
58 |
;; |
59 |
setup) |
60 |
for i in "$@" ; do |
61 |
if [[ -f ${EROOT}${i} && ! -h ${EROOT}${i} ]] ; then |
62 |
has_version ${pkg} && ewarn "You must reinstall ${pkg} !" |
63 |
break |
64 |
fi |
65 |
done |
66 |
;; |
67 |
install) |
68 |
for i in "$@" ; do |
69 |
if ! [[ -f "${ED}"${i} ]] ; then |
70 |
ewarn "${i} does not exist!" |
71 |
continue |
72 |
fi |
73 |
mv "${ED}"${i}{,-${ver}-${P}} || die |
74 |
done |
75 |
;; |
76 |
esac |
77 |
} |
78 |
|
79 |
src_remove_dual_man() { |
80 |
local i pkg ver ff |
81 |
pkg="$1" |
82 |
ver="$2" |
83 |
shift 2 |
84 |
case "${EBUILD_PHASE:-none}" in |
85 |
postinst|postrm) |
86 |
for i in "$@" ; do |
87 |
ff=`echo "${EROOT}${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}}"*` |
88 |
ff=${ff##*${i#${i%.[0-9]}}} |
89 |
alternatives_auto_makesym "${i}${ff}" "${i%.[0-9]}-[0-9]*" |
90 |
done |
91 |
;; |
92 |
install) |
93 |
for i in "$@" ; do |
94 |
if ! [[ -f "${ED}"${i} ]] ; then |
95 |
ewarn "${i} does not exist!" |
96 |
continue |
97 |
fi |
98 |
mv "${ED}"${i} "${ED}"${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}} || die |
99 |
done |
100 |
;; |
101 |
esac |
102 |
} |
103 |
|
104 |
src_remove_dual() { |
105 |
local i pkg ver |
106 |
pkg="$1" |
107 |
ver="$2" |
108 |
shift 2 |
109 |
for i in "$@" ; do |
110 |
src_remove_dual_file "${pkg}" "${ver}" "/usr/bin/${i}" |
111 |
src_remove_dual_man "${pkg}" "${ver}" "/usr/share/man/man1/${i}.1" |
112 |
done |
113 |
} |
114 |
|
115 |
|
116 |
|
117 |
|
118 |
1.1 dev-lang/perl/files/eblits/src_configure-v50160001.eblit |
119 |
|
120 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/perl/files/eblits/src_configure-v50160001.eblit?rev=1.1&view=markup |
121 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/perl/files/eblits/src_configure-v50160001.eblit?rev=1.1&content-type=text/plain |
122 |
|
123 |
Index: src_configure-v50160001.eblit |
124 |
=================================================================== |
125 |
# Copyright 1999-2012 Gentoo Foundation |
126 |
# Distributed under the terms of the GNU General Public License v2 |
127 |
# $Header: /var/cvsroot/gentoo-x86/dev-lang/perl/files/eblits/src_configure-v50160001.eblit,v 1.1 2012/06/05 17:52:35 tove Exp $ |
128 |
|
129 |
myconf() { |
130 |
# the myconf array is declared in src_configure |
131 |
myconf=( "${myconf[@]}" "$@" ) |
132 |
} |
133 |
|
134 |
eblit-perl-src_configure() { |
135 |
declare -a myconf |
136 |
|
137 |
export LC_ALL="C" |
138 |
[[ ${COLUMNS:-1} -ge 1 ]] || unset COLUMNS # bug #394091 |
139 |
|
140 |
# some arches and -O do not mix :) |
141 |
use ppc && replace-flags -O? -O1 |
142 |
# Perl has problems compiling with -Os in your flags with glibc |
143 |
use elibc_uclibc || replace-flags "-Os" "-O2" |
144 |
# This flag makes compiling crash in interesting ways |
145 |
filter-flags "-malign-double" |
146 |
# Fixes bug #97645 |
147 |
use ppc && filter-flags "-mpowerpc-gpopt" |
148 |
# Fixes bug #143895 on gcc-4.1.1 |
149 |
filter-flags "-fsched2-use-superblocks" |
150 |
|
151 |
use sparc && myconf -Ud_longdbl |
152 |
|
153 |
export BUILD_BZIP2=0 |
154 |
export BZIP2_INCLUDE=${EPREFIX}/usr/include |
155 |
export BZIP2_LIB=${EPREFIX}/usr/$(get_libdir) |
156 |
|
157 |
export BUILD_ZLIB=False |
158 |
export ZLIB_INCLUDE=${EPREFIX}/usr/include |
159 |
export ZLIB_LIB=${EPREFIX}/usr/$(get_libdir) |
160 |
|
161 |
# allow either gdbm to provide ndbm (in <gdbm/ndbm.h>) or db1 |
162 |
|
163 |
myndbm='U' |
164 |
mygdbm='U' |
165 |
mydb='U' |
166 |
|
167 |
if use gdbm ; then |
168 |
mygdbm='D' |
169 |
myndbm='D' |
170 |
fi |
171 |
if use berkdb ; then |
172 |
mydb='D' |
173 |
has_version '=sys-libs/db-1*' && myndbm='D' |
174 |
fi |
175 |
|
176 |
myconf "-${myndbm}i_ndbm" "-${mygdbm}i_gdbm" "-${mydb}i_db" |
177 |
|
178 |
if use alpha && [[ "$(tc-getCC)" = "ccc" ]] ; then |
179 |
ewarn "Perl will not be built with berkdb support, use gcc if you needed it..." |
180 |
myconf -Ui_db -Ui_ndbm |
181 |
fi |
182 |
|
183 |
use ithreads && myconf -Dusethreads |
184 |
|
185 |
if use debug ; then |
186 |
append-cflags "-g" |
187 |
myconf -DDEBUGGING |
188 |
elif [[ ${CFLAGS} == *-g* ]] ; then |
189 |
myconf -DDEBUGGING=-g |
190 |
else |
191 |
myconf -DDEBUGGING=none |
192 |
fi |
193 |
|
194 |
if [[ -n ${PERL_OLDVERSEN} ]] ; then |
195 |
local inclist=$(for v in ${PERL_OLDVERSEN}; do echo -n "${v}/${myarch}${mythreading} ${v} "; done ) |
196 |
myconf -Dinc_version_list="${inclist}" |
197 |
fi |
198 |
|
199 |
[[ ${ELIBC} == "FreeBSD" ]] && myconf "-Dlibc=/usr/$(get_libdir)/libc.a" |
200 |
|
201 |
# Prefix: the host system needs not to follow Gentoo multilib stuff, and in |
202 |
# Prefix itself we don't do multilib either, so make sure perl can find |
203 |
# something compatible. |
204 |
if use prefix ; then |
205 |
local ldir |
206 |
local llib |
207 |
local paths="" |
208 |
echo "int main() {}" > "${T}"/t.c |
209 |
# need to ensure dirs contain compatible libs, bug #358875 |
210 |
for ldir in /lib /usr/lib /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 ; do |
211 |
[[ -d ${ldir} ]] || continue |
212 |
# find a random lib from here |
213 |
llib=( ${ldir}/*$(get_libname) ) |
214 |
[[ -e ${llib[0]} ]] || continue |
215 |
$(tc-getCC) -o "${T}"/t "${T}"/t.c ${llib[0]} >& /dev/null \ |
216 |
&& paths="${paths} ${ldir}" |
217 |
done |
218 |
myconf "-Dlibpth=${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir) ${paths}" |
219 |
elif [[ $(get_libdir) != "lib" ]] ; then |
220 |
# We need to use " and not ', as the written config.sh use ' ... |
221 |
myconf "-Dlibpth=/usr/local/$(get_libdir) /$(get_libdir) /usr/$(get_libdir)" |
222 |
fi |
223 |
|
224 |
# don't try building ODBM, bug #354453 |
225 |
myconf -Dnoextensions=ODBM_File |
226 |
|
227 |
sh Configure \ |
228 |
-des \ |
229 |
-Duseshrplib \ |
230 |
-Darchname="${myarch}" \ |
231 |
-Dcc="$(tc-getCC)" \ |
232 |
-Doptimize="${CFLAGS}" \ |
233 |
-Dldflags="${LDFLAGS}" \ |
234 |
-Dprefix="${EPREFIX}"'/usr' \ |
235 |
-Dinstallprefix="${EPREFIX}"'/usr' \ |
236 |
-Dsiteprefix="${EPREFIX}"'/usr/local' \ |
237 |
-Dvendorprefix="${EPREFIX}"'/usr' \ |
238 |
-Dscriptdir="${EPREFIX}"'/usr/bin' \ |
239 |
-Dprivlib="${EPREFIX}${PRIV_LIB}" \ |
240 |
-Darchlib="${EPREFIX}${ARCH_LIB}" \ |
241 |
-Dsitelib="${EPREFIX}${SITE_LIB}" \ |
242 |
-Dsitearch="${EPREFIX}${SITE_ARCH}" \ |
243 |
-Dvendorlib="${EPREFIX}${VENDOR_LIB}" \ |
244 |
-Dvendorarch="${EPREFIX}${VENDOR_ARCH}" \ |
245 |
-Dman1dir="${EPREFIX}"/usr/share/man/man1 \ |
246 |
-Dman3dir="${EPREFIX}"/usr/share/man/man3 \ |
247 |
-Dsiteman1dir="${EPREFIX}"/usr/local/man/man1 \ |
248 |
-Dsiteman3dir="${EPREFIX}"/usr/local/man/man3 \ |
249 |
-Dvendorman1dir="${EPREFIX}"/usr/share/man/man1 \ |
250 |
-Dvendorman3dir="${EPREFIX}"/usr/share/man/man3 \ |
251 |
-Dman1ext='1' \ |
252 |
-Dman3ext='3pm' \ |
253 |
-Dlibperl="${LIBPERL}" \ |
254 |
-Dlocincpth="${EPREFIX}"'/usr/include ' \ |
255 |
-Dglibpth="${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir)"' ' \ |
256 |
-Duselargefiles \ |
257 |
-Dd_semctl_semun \ |
258 |
-Dcf_by='Gentoo' \ |
259 |
-Dmyhostname='localhost' \ |
260 |
-Dperladmin='root@localhost' \ |
261 |
-Dinstallusrbinperl='n' \ |
262 |
-Ud_csh \ |
263 |
-Uusenm \ |
264 |
"${myconf[@]}" || die "Unable to configure" |
265 |
} |
266 |
|
267 |
|
268 |
|
269 |
1.1 dev-lang/perl/files/eblits/src_test-v50160001.eblit |
270 |
|
271 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/perl/files/eblits/src_test-v50160001.eblit?rev=1.1&view=markup |
272 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/perl/files/eblits/src_test-v50160001.eblit?rev=1.1&content-type=text/plain |
273 |
|
274 |
Index: src_test-v50160001.eblit |
275 |
=================================================================== |
276 |
# Copyright 1999-2012 Gentoo Foundation |
277 |
# Distributed under the terms of the GNU General Public License v2 |
278 |
# $Header: /var/cvsroot/gentoo-x86/dev-lang/perl/files/eblits/src_test-v50160001.eblit,v 1.1 2012/06/05 17:52:35 tove Exp $ |
279 |
|
280 |
eblit-perl-src_test() { |
281 |
if [[ ${EUID} == 0 ]] ; then |
282 |
ewarn "Test fails with a sandbox error (#328793) if run as root. Skipping tests..." |
283 |
return 0 |
284 |
fi |
285 |
use elibc_uclibc && export MAKEOPTS+=" -j1" |
286 |
TEST_JOBS="$(makeopts_jobs)" make test_harness || die "test failed" |
287 |
} |
288 |
|
289 |
|
290 |
|
291 |
1.1 dev-lang/perl/files/eblits/pkg_setup-v50160001.eblit |
292 |
|
293 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/perl/files/eblits/pkg_setup-v50160001.eblit?rev=1.1&view=markup |
294 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/perl/files/eblits/pkg_setup-v50160001.eblit?rev=1.1&content-type=text/plain |
295 |
|
296 |
Index: pkg_setup-v50160001.eblit |
297 |
=================================================================== |
298 |
# Copyright 1999-2012 Gentoo Foundation |
299 |
# Distributed under the terms of the GNU General Public License v2 |
300 |
# $Header: /var/cvsroot/gentoo-x86/dev-lang/perl/files/eblits/pkg_setup-v50160001.eblit,v 1.1 2012/06/05 17:52:35 tove Exp $ |
301 |
|
302 |
eblit-perl-pkg_setup() { |
303 |
case ${CHOST} in |
304 |
*-freebsd*) osname="freebsd" ;; |
305 |
*-dragonfly*) osname="dragonfly" ;; |
306 |
*-netbsd*) osname="netbsd" ;; |
307 |
*-openbsd*) osname="openbsd" ;; |
308 |
*-darwin*) osname="darwin" ;; |
309 |
*-interix*) osname="interix" ;; |
310 |
*) osname="linux" ;; |
311 |
esac |
312 |
|
313 |
myarch="${CHOST%%-*}-${osname}" |
314 |
if use debug ; then |
315 |
myarch+="-debug" |
316 |
fi |
317 |
if use ithreads ; then |
318 |
mythreading="-multi" |
319 |
myarch+="-thread" |
320 |
fi |
321 |
|
322 |
LIBPERL="libperl$(get_libname ${MY_PV} )" |
323 |
PRIV_LIB="/usr/$(get_libdir)/perl5/${MY_PV}" |
324 |
ARCH_LIB="/usr/$(get_libdir)/perl5/${MY_PV}/${myarch}${mythreading}" |
325 |
SITE_LIB="/usr/local/$(get_libdir)/perl5/${MY_PV}" |
326 |
SITE_ARCH="/usr/local/$(get_libdir)/perl5/${MY_PV}/${myarch}${mythreading}" |
327 |
VENDOR_LIB="/usr/$(get_libdir)/perl5/vendor_perl/${MY_PV}" |
328 |
VENDOR_ARCH="/usr/$(get_libdir)/perl5/vendor_perl/${MY_PV}/${myarch}${mythreading}" |
329 |
|
330 |
if use ithreads ; then |
331 |
echo "" |
332 |
ewarn "THREADS WARNING:" |
333 |
ewarn "PLEASE NOTE: You are compiling ${MY_P} with" |
334 |
ewarn "interpreter-level threading enabled." |
335 |
ewarn "Threading is not supported by all applications " |
336 |
ewarn "that compile against perl. You use threading at " |
337 |
ewarn "your own discretion. " |
338 |
fi |
339 |
check_rebuild |
340 |
dual_scripts |
341 |
} |
342 |
|
343 |
check_rebuild() { |
344 |
if has_version "<dev-lang/perl-${SHORT_PV}" ; then |
345 |
echo "" |
346 |
ewarn "UPDATE THE PERL MODULES:" |
347 |
ewarn "After updating dev-lang/perl you must reinstall" |
348 |
ewarn "the installed perl modules." |
349 |
ewarn "Use: perl-cleaner --all" |
350 |
elif has_version dev-lang/perl ; then |
351 |
# doesnot work |
352 |
#if ! has_version dev-lang/perl[ithreads=,debug=] ; then |
353 |
#if ! has_version dev-lang/perl[ithreads=] || ! has_version dev-lang/perl[debug=] ; then |
354 |
if ( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \ |
355 |
( ! use ithreads && has_version dev-lang/perl[ithreads] ) || \ |
356 |
( use debug && ! has_version dev-lang/perl[debug] ) || \ |
357 |
( ! use debug && has_version dev-lang/perl[debug] ) ; then |
358 |
echo "" |
359 |
ewarn "TOGGLED USE-FLAGS WARNING:" |
360 |
ewarn "You changed one of the use-flags ithreads or debug." |
361 |
ewarn "You must rebuild all perl-modules installed." |
362 |
ewarn "Use: perl-cleaner --modules ; perl-cleaner --force --libperl" |
363 |
fi |
364 |
fi |
365 |
} |
366 |
|
367 |
|
368 |
|
369 |
|
370 |
1.1 dev-lang/perl/files/eblits/src_install-v50160001.eblit |
371 |
|
372 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/perl/files/eblits/src_install-v50160001.eblit?rev=1.1&view=markup |
373 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/perl/files/eblits/src_install-v50160001.eblit?rev=1.1&content-type=text/plain |
374 |
|
375 |
Index: src_install-v50160001.eblit |
376 |
=================================================================== |
377 |
# Copyright 1999-2012 Gentoo Foundation |
378 |
# Distributed under the terms of the GNU General Public License v2 |
379 |
# $Header: /var/cvsroot/gentoo-x86/dev-lang/perl/files/eblits/src_install-v50160001.eblit,v 1.1 2012/06/05 17:52:35 tove Exp $ |
380 |
|
381 |
eblit-perl-src_install() { |
382 |
local i |
383 |
local coredir="${ARCH_LIB}/CORE" |
384 |
|
385 |
emake DESTDIR="${D}" install |
386 |
|
387 |
rm -f "${ED}"/usr/bin/perl |
388 |
ln -s perl${MY_PV} "${ED}"/usr/bin/perl || die |
389 |
|
390 |
if ! tc-is-static-only ; then |
391 |
dolib.so "${ED}"${coredir}/${LIBPERL} |
392 |
rm -f "${ED}"${coredir}/${LIBPERL} |
393 |
ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname ${SHORT_PV}) || die |
394 |
ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname) || die |
395 |
ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/${LIBPERL} || die |
396 |
ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/libperl$(get_libname ${SHORT_PV}) || die |
397 |
ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/libperl$(get_libname) || die |
398 |
fi |
399 |
|
400 |
rm -rf "${ED}"/usr/share/man/man3 || die "Unable to remove module man pages" |
401 |
|
402 |
# # A poor fix for the miniperl issues |
403 |
# dosed 's:./miniperl:/usr/bin/perl:' /usr/$(get_libdir)/perl5/${MY_PV}/ExtUtils/xsubpp |
404 |
# fperms 0444 /usr/$(get_libdir)/perl5/${MY_PV}/ExtUtils/xsubpp |
405 |
# dosed 's:./miniperl:/usr/bin/perl:' /usr/bin/xsubpp |
406 |
# fperms 0755 /usr/bin/xsubpp |
407 |
|
408 |
# This removes ${D} from Config.pm |
409 |
for i in $(find "${D}" -iname "Config.pm" ) ; do |
410 |
einfo "Removing ${D} from ${i}..." |
411 |
sed -i -e "s:${D}::" "${i}" || die "Sed failed" |
412 |
done |
413 |
|
414 |
find "${ED}" -type f -name .packlist -delete || die |
415 |
|
416 |
# Note: find out from psm why we would need/want this. |
417 |
# ( use berkdb && has_version '=sys-libs/db-1*' ) || |
418 |
# find "${ED}" -name "*NDBM*" | xargs rm -f |
419 |
|
420 |
dodoc Changes* README AUTHORS |
421 |
|
422 |
if use doc ; then |
423 |
# HTML Documentation |
424 |
# We expect errors, warnings, and such with the following. |
425 |
|
426 |
dodir /usr/share/doc/${PF}/html |
427 |
LD_LIBRARY_PATH=. ./perl installhtml \ |
428 |
--podroot='.' \ |
429 |
--podpath='lib:ext:pod:vms' \ |
430 |
--recurse \ |
431 |
--htmldir="${ED}/usr/share/doc/${PF}/html" |
432 |
fi |
433 |
|
434 |
dual_scripts |
435 |
} |
436 |
|
437 |
|
438 |
|
439 |
1.1 dev-lang/perl/files/eblits/pkg_postinst-v50160001.eblit |
440 |
|
441 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/perl/files/eblits/pkg_postinst-v50160001.eblit?rev=1.1&view=markup |
442 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/perl/files/eblits/pkg_postinst-v50160001.eblit?rev=1.1&content-type=text/plain |
443 |
|
444 |
Index: pkg_postinst-v50160001.eblit |
445 |
=================================================================== |
446 |
# Copyright 1999-2012 Gentoo Foundation |
447 |
# Distributed under the terms of the GNU General Public License v2 |
448 |
# $Header: /var/cvsroot/gentoo-x86/dev-lang/perl/files/eblits/pkg_postinst-v50160001.eblit,v 1.1 2012/06/05 17:52:35 tove Exp $ |
449 |
|
450 |
eblit-perl-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/'${SHORT_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 |
|
472 |
# ebegin "Generating ConfigLocal.pm (ignore any error)" |
473 |
# enc2xs -C |
474 |
|
475 |
einfo "Converting C header files to the corresponding Perl format (ignore any error)" |
476 |
# Prefix note: unprefixed as this is all kernel/libc stuff that we never provide |
477 |
pushd /usr/include >/dev/null |
478 |
h2ph -Q -a -d "${EPREFIX}"${ARCH_LIB} \ |
479 |
asm/termios.h syscall.h syslimits.h syslog.h sys/ioctl.h \ |
480 |
sys/socket.h sys/time.h wait.h sysexits.h |
481 |
popd >/dev/null |
482 |
|
483 |
# This has been moved into a function because rumor has it that a future release |
484 |
# of portage will allow us to check what version was just removed - which means |
485 |
# we will be able to invoke this only as needed :) |
486 |
# Tried doing this via -z, but $INC is too big... |
487 |
#if [[ "${INC}x" != "x" ]]; then |
488 |
# cleaner_msg |
489 |
#fi |
490 |
fi |
491 |
} |
492 |
|
493 |
cleaner_msg() { |
494 |
eerror "You have had multiple versions of perl. It is recommended" |
495 |
eerror "that you run perl-cleaner now. perl-cleaner will" |
496 |
eerror "assist with this transition. This script is capable" |
497 |
eerror "of cleaning out old .ph files, rebuilding modules for " |
498 |
eerror "your new version of perl, as well as re-emerging" |
499 |
eerror "applications that compiled against your old libperl$(get_libname)" |
500 |
eerror |
501 |
eerror "PLEASE DO NOT INTERRUPT THE RUNNING OF THIS SCRIPT." |
502 |
eerror "Part of the rebuilding of applications compiled against " |
503 |
eerror "your old libperl involves temporarily unmerging" |
504 |
eerror "them - interruptions could leave you with unmerged" |
505 |
eerror "packages before they can be remerged." |
506 |
eerror "" |
507 |
eerror "If you have run perl-cleaner and a package still gives" |
508 |
eerror "you trouble, and re-emerging it fails to correct" |
509 |
eerror "the problem, please check http://bugs.gentoo.org/" |
510 |
eerror "for more information or to report a bug." |
511 |
eerror "" |
512 |
} |
513 |
|
514 |
|
515 |
|
516 |
1.1 dev-lang/perl/files/eblits/src_prepare-v50160001.eblit |
517 |
|
518 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/perl/files/eblits/src_prepare-v50160001.eblit?rev=1.1&view=markup |
519 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/perl/files/eblits/src_prepare-v50160001.eblit?rev=1.1&content-type=text/plain |
520 |
|
521 |
Index: src_prepare-v50160001.eblit |
522 |
=================================================================== |
523 |
# Copyright 1999-2012 Gentoo Foundation |
524 |
# Distributed under the terms of the GNU General Public License v2 |
525 |
# $Header: /var/cvsroot/gentoo-x86/dev-lang/perl/files/eblits/src_prepare-v50160001.eblit,v 1.1 2012/06/05 17:52:35 tove Exp $ |
526 |
|
527 |
src_prepare_update_patchlevel_h() { |
528 |
# Copied and modified from debian: |
529 |
# Copyright 2011 Niko Tyni |
530 |
# This program is free software; you can redistribute it and/or modify |
531 |
# it under the same terms as Perl itself. |
532 |
local patchdir="${WORKDIR}/patches" |
533 |
local prefix |
534 |
|
535 |
[[ -f ${patchdir}/series ]] || return 0 |
536 |
|
537 |
while read patch |
538 |
do |
539 |
patchname=$(echo $patch | sed 's/\.diff$//') |
540 |
< $patchdir/$patch sed -e '/^Subject:/ { N; s/\n / / }' | sed -n -e ' |
541 |
|
542 |
# massage the patch headers |
543 |
s|^Bug: .*https\?://rt\.perl\.org/.*id=\(.*\).*|[perl #\1]|; tprepend; |
544 |
s|^Bug: .*https\?://rt\.cpan\.org/.*id=\(.*\).*|[rt.cpan.org #\1]|; tprepend; |
545 |
s|^Bug-Gentoo: ||; tprepend; |
546 |
s/^\(Subject\|Description\): //; tappend; |
547 |
s|^Origin: .*http://perl5\.git\.perl\.org/perl\.git/commit\(diff\)\?/\(.......\).*|[\2]|; tprepend; |
548 |
|
549 |
# post-process at the end of input |
550 |
$ { x; |
551 |
# include the version number in the patchlevel.h description (if available) |
552 |
s/List packaged patches/&'" for ${PF}(#${PATCH_VER})"'/; |
553 |
|
554 |
# escape any backslashes and double quotes |
555 |
s|\\|\\\\|g; s|"|\\"|g; |
556 |
|
557 |
# add a prefix |
558 |
s|^|\t,"'"$prefix$patchname"' - |; |
559 |
# newlines away |
560 |
s/\n/ /g; s/ */ /g; |
561 |
# add a suffix |
562 |
s/ *$/"/; p |
563 |
}; |
564 |
# stop all processing |
565 |
d; |
566 |
# label: append to the hold space |
567 |
:append H; d; |
568 |
# label: prepend to the hold space |
569 |
:prepend x; H; d; |
570 |
' |
571 |
done < "${WORKDIR}"/patches/series > "${S}"/patchlevel-gentoo.h |
572 |
} |
573 |
|
574 |
eblit-perl-src_prepare() { |
575 |
local patch |
576 |
EPATCH_OPTS+=" -p1" |
577 |
einfo "Applying patches from ${MY_P}-${PATCH_VER} ..." |
578 |
while read patch ; do |
579 |
EPATCH_SINGLE_MSG=" ${patch} ..." |
580 |
epatch "${WORKDIR}"/patches/${patch} |
581 |
done < "${WORKDIR}"/patches/series |
582 |
|
583 |
src_prepare_update_patchlevel_h |
584 |
|
585 |
# pod/perltoc.pod fails |
586 |
# lib/ExtUtils/t/Embed.t fails |
587 |
if ! tc-is-static-only ; then |
588 |
ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die |
589 |
ln -s ${LIBPERL} libperl$(get_libname ) || die |
590 |
fi |
591 |
} |