1 |
tove 08/05/09 11:04:54 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: libperl-5.8.8-r2.ebuild |
5 |
Log: |
6 |
#219203 - Version bump. Added patch from bug #198196. Apply lib64.patch for ppc64 too like dev-lang/perl-5.8.8 does |
7 |
(Portage version: 2.1.5_rc7) |
8 |
|
9 |
Revision Changes Path |
10 |
1.128 sys-devel/libperl/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/libperl/ChangeLog?rev=1.128&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/libperl/ChangeLog?rev=1.128&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/libperl/ChangeLog?r1=1.127&r2=1.128 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/sys-devel/libperl/ChangeLog,v |
19 |
retrieving revision 1.127 |
20 |
retrieving revision 1.128 |
21 |
diff -u -r1.127 -r1.128 |
22 |
--- ChangeLog 6 Aug 2007 16:34:27 -0000 1.127 |
23 |
+++ ChangeLog 9 May 2008 11:04:54 -0000 1.128 |
24 |
@@ -1,6 +1,14 @@ |
25 |
# ChangeLog for sys-devel/libperl |
26 |
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/libperl/ChangeLog,v 1.127 2007/08/06 16:34:27 truedfx Exp $ |
28 |
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 |
29 |
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/libperl/ChangeLog,v 1.128 2008/05/09 11:04:54 tove Exp $ |
30 |
+ |
31 |
+*libperl-5.8.8-r2 (09 May 2008) |
32 |
+ |
33 |
+ 09 May 2008; Torsten Veller <tove@g.o> |
34 |
+ +files/libperl-5.8.8-CVE-2008-1927.patch, |
35 |
+ +files/libperl-5.8.8-utf8-boundary.patch, +libperl-5.8.8-r2.ebuild: |
36 |
+ #219203 - Version bump. Added patch from bug #198196. Apply |
37 |
+ libperl-5.8.8-lib64.patch for ppc64 too like dev-lang/perl-5.8.8. |
38 |
|
39 |
06 Aug 2007; <truedfx@g.o> |
40 |
+files/libperl-5.8.8-makedepend-syntax.patch, libperl-5.8.8-r1.ebuild: |
41 |
|
42 |
|
43 |
|
44 |
1.1 sys-devel/libperl/libperl-5.8.8-r2.ebuild |
45 |
|
46 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/libperl/libperl-5.8.8-r2.ebuild?rev=1.1&view=markup |
47 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/libperl/libperl-5.8.8-r2.ebuild?rev=1.1&content-type=text/plain |
48 |
|
49 |
Index: libperl-5.8.8-r2.ebuild |
50 |
=================================================================== |
51 |
# Copyright 1999-2008 Gentoo Foundation |
52 |
# Distributed under the terms of the GNU General Public License v2 |
53 |
# $Header: /var/cvsroot/gentoo-x86/sys-devel/libperl/libperl-5.8.8-r2.ebuild,v 1.1 2008/05/09 11:04:54 tove Exp $ |
54 |
|
55 |
# The basic theory based on comments from Daniel Robbins <drobbins@g.o>. |
56 |
# |
57 |
# We split the perl ebuild into libperl and perl. The layout is as follows: |
58 |
# |
59 |
# libperl: |
60 |
# |
61 |
# This is a slotted (SLOT=[0-9]*) ebuild, meaning we should be able to have a |
62 |
# few versions that are not binary compadible installed. |
63 |
# |
64 |
# How we get libperl.so multi-versioned, is by adding to the link command: |
65 |
# |
66 |
# -Wl,-soname -Wl,libperl.so.`echo $(LIBPERL) | cut -d. -f3` |
67 |
# |
68 |
# This gives us: |
69 |
# |
70 |
# $(LIBPERL): $& perl$(OBJ_EXT) $(obj) $(LIBPERLEXPORT) |
71 |
# $(LD) -o $@ $(SHRPLDFLAGS) perl$(OBJ_EXT) $(obj) \ |
72 |
# -Wl,-soname -Wl,libperl.so.`echo $(LIBPERL) | cut -d. -f3` |
73 |
# |
74 |
# We then configure perl with LIBPERL set to: |
75 |
# |
76 |
# LIBPERL="libperl.so.${SLOT}.`echo ${PV} | cut -d. -f1,2`" |
77 |
# |
78 |
# Or with the variables defined in this ebuild: |
79 |
# |
80 |
# LIBPERL="libperl.so.${PERLSLOT}.${SHORT_PV}" |
81 |
# |
82 |
# The result is that our 'soname' is 'libperl.so.${PERLSLOT}' (at the time of |
83 |
# writing this for perl-5.8.0, 'libperl.so.1'), causing all apps that is linked |
84 |
# to libperl to link to 'libperl.so.${PERLSLOT}'. |
85 |
# |
86 |
# If a new perl version, perl-z.y.z comes out that have a libperl not binary |
87 |
# compatible with the previous version, we just keep the previous libperl |
88 |
# installed, and all apps linked to it will still be able to use: |
89 |
# |
90 |
# libperl.so.${PERLSLOT}' |
91 |
# |
92 |
# while the new ones will link to: |
93 |
# |
94 |
# libperl.so.$((PERLSLOT+1))' |
95 |
# |
96 |
# perl: |
97 |
# |
98 |
# Not much to this one. It compiles with a static libperl.a, and are unslotted |
99 |
# (meaning SLOT=0). We thus always have the latest *stable* perl version |
100 |
# installed, with corrisponding version of libperl. The perl ebuild will of |
101 |
# course DEPEND on libperl. |
102 |
# |
103 |
# Martin Schlemmer <azarah@g.o> (28 Dec 2002). |
104 |
|
105 |
IUSE="berkdb debug gdbm ithreads" |
106 |
|
107 |
inherit eutils flag-o-matic toolchain-funcs multilib |
108 |
|
109 |
# The slot of this binary compat version of libperl.so |
110 |
PERLSLOT="1" |
111 |
|
112 |
SHORT_PV="${PV%.*}" |
113 |
MY_P="perl-${PV/_rc/-RC}" |
114 |
S="${WORKDIR}/${MY_P}" |
115 |
DESCRIPTION="Larry Wall's Practical Extraction and Reporting Language" |
116 |
SRC_URI="mirror://cpan/src/${MY_P}.tar.bz2" |
117 |
HOMEPAGE="http://www.perl.org" |
118 |
SLOT="${PERLSLOT}" |
119 |
LIBPERL="libperl$(get_libname ${PERLSLOT}.${SHORT_PV})" |
120 |
LICENSE="|| ( Artistic GPL-2 )" |
121 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" |
122 |
|
123 |
# rac 2004.08.06 |
124 |
|
125 |
# i am not kidding here. you will forkbomb yourself out of existence |
126 |
# because make check -n wants to make miniperl, which runs itself at |
127 |
# the very end to make sure it's working right. this behaves very |
128 |
# badly when you -n it, because it won't exist and will therefore try |
129 |
# to build itself again ad infinitum. |
130 |
|
131 |
RESTRICT="test" |
132 |
|
133 |
DEPEND="berkdb? ( sys-libs/db ) |
134 |
gdbm? ( >=sys-libs/gdbm-1.8.0 ) |
135 |
elibc_FreeBSD? ( sys-freebsd/freebsd-mk-defs )" |
136 |
|
137 |
RDEPEND=" |
138 |
berkdb? ( sys-libs/db ) |
139 |
gdbm? ( >=sys-libs/gdbm-1.8.0 )" |
140 |
|
141 |
PDEPEND="~dev-lang/perl-${PV}" |
142 |
|
143 |
pkg_setup() { |
144 |
# I think this should rather be displayed if you *have* 'ithreads' |
145 |
# in USE if it could break things ... |
146 |
if use ithreads |
147 |
then |
148 |
ewarn "" |
149 |
ewarn "PLEASE NOTE: You are compiling perl-5.8 with" |
150 |
ewarn "interpreter-level threading enabled." |
151 |
ewarn "Threading is not supported by all applications " |
152 |
ewarn "that compile against perl. You use threading at " |
153 |
ewarn "your own discretion. " |
154 |
ewarn "" |
155 |
epause 10 |
156 |
fi |
157 |
} |
158 |
|
159 |
src_unpack() { |
160 |
|
161 |
unpack ${A} |
162 |
|
163 |
# Fix the build scripts to create libperl with a soname of ${SLOT}. |
164 |
# We basically add: |
165 |
# |
166 |
# -Wl,-soname -Wl,libperl.so.`echo $(LIBPERL) | cut -d. -f3` |
167 |
# |
168 |
# to the line that links libperl.so, and then set LIBPERL to: |
169 |
# |
170 |
# LIBPERL=libperl.so.${SLOT}.`echo ${PV} | cut -d. -f1,2` |
171 |
# |
172 |
cd "${S}"; |
173 |
use userland_Darwin || epatch "${FILESDIR}"/${PN}-create-libperl-soname.patch |
174 |
|
175 |
# Configure makes an unwarranted assumption that /bin/ksh is a |
176 |
# good shell. This patch makes it revert to using /bin/sh unless |
177 |
# /bin/ksh really is executable. Should fix bug 42665. |
178 |
# rac 2004.06.09 |
179 |
cd "${S}"; epatch "${FILESDIR}"/${PN}-noksh.patch |
180 |
|
181 |
# we need the same @INC-inversion magic here we do in perl |
182 |
cd "${S}"; epatch "${FILESDIR}"/${P}-reorder-INC.patch |
183 |
|
184 |
# makedepend.SH contains a syntax error which is ignored by bash but causes |
185 |
# dash to abort |
186 |
epatch "${FILESDIR}"/${P}-makedepend-syntax.patch |
187 |
|
188 |
# On PA7200, uname -a contains a single quote and we need to |
189 |
# filter it otherwise configure fails. See #125535. |
190 |
epatch "${FILESDIR}"/perl-hppa-pa7200-configure.patch |
191 |
|
192 |
use amd64 || use ppc64 && cd "${S}" && epatch "${FILESDIR}"/${P}-lib64.patch |
193 |
[[ ${CHOST} == *-dragonfly* ]] && cd "${S}" && epatch "${FILESDIR}"/${P}-dragonfly-clean.patch |
194 |
[[ ${CHOST} == *-freebsd* ]] && cd "${S}" && epatch "${FILESDIR}"/${P}-fbsdhints.patch |
195 |
cd "${S}"; epatch "${FILESDIR}"/${P}-cplusplus.patch |
196 |
has_version '>=sys-devel/gcc-4.2' && epatch "${FILESDIR}"/${P}-gcc42-command-line.patch |
197 |
|
198 |
# patch to fix bug #198196 |
199 |
# UTF/Regular expressions boundary error (CVE-2007-5116) |
200 |
epatch "${FILESDIR}"/${P}-utf8-boundary.patch |
201 |
|
202 |
# patch to fix bug #219203 |
203 |
epatch "${FILESDIR}"/${P}-CVE-2008-1927.patch |
204 |
} |
205 |
|
206 |
myconf() { |
207 |
myconf=( "${myconf[@]}" "$@" ) |
208 |
} |
209 |
|
210 |
src_compile() { |
211 |
declare -a myconf |
212 |
|
213 |
# Perl has problems compiling with -Os in your flags |
214 |
# some arches and -O do not mix :) |
215 |
use arm && replace-flags -O? -O1 |
216 |
use ppc && replace-flags -O? -O1 |
217 |
use ia64 && replace-flags -O? -O1 |
218 |
# Perl has problems compiling with -Os in your flags with glibc |
219 |
use elibc_uclibc || replace-flags "-Os" "-O2" |
220 |
( gcc-specs-ssp && use ia64 ) && append-flags -fno-stack-protector |
221 |
# This flag makes compiling crash in interesting ways |
222 |
filter-flags "-malign-double" |
223 |
# Fixes bug #97645 |
224 |
use ppc && filter-flags -mpowerpc-gpopt |
225 |
# Fixes bug #143895 on gcc-4.1.1 |
226 |
filter-flags "-fsched2-use-superblocks" |
227 |
|
228 |
export LC_ALL="C" |
229 |
|
230 |
case ${CHOST} in |
231 |
*-freebsd*) osname="freebsd" ;; |
232 |
*-dragonfly*) osname="dragonfly" ;; |
233 |
*-netbsd*) osname="netbsd" ;; |
234 |
*-openbsd*) osname="openbsd" ;; |
235 |
*-darwin*) osname="darwin" ;; |
236 |
|
237 |
*) osname="linux" ;; |
238 |
esac |
239 |
|
240 |
if use ithreads |
241 |
then |
242 |
einfo "using ithreads" |
243 |
mythreading="-multi" |
244 |
myconf -Dusethreads |
245 |
myarch=${CHOST} |
246 |
myarch="${myarch%%-*}-${osname}-thread" |
247 |
else |
248 |
myarch=${CHOST} |
249 |
myarch="${myarch%%-*}-${osname}" |
250 |
fi |
251 |
|
252 |
local inclist=$(for v in $PERL_OLDVERSEN; do echo -n "$v $v/$myarch$mythreading "; done) |
253 |
|
254 |
# allow either gdbm to provide ndbm (in <gdbm/ndbm.h>) or db1 |
255 |
|
256 |
myndbm='U' |
257 |
mygdbm='U' |
258 |
mydb='U' |
259 |
|
260 |
if use gdbm |
261 |
then |
262 |
mygdbm='D' |
263 |
myndbm='D' |
264 |
fi |
265 |
if use berkdb |
266 |
then |
267 |
mydb='D' |
268 |
has_version '=sys-libs/db-1*' && myndbm='D' |
269 |
fi |
270 |
|
271 |
myconf "-${myndbm}i_ndbm" "-${mygdbm}i_gdbm" "-${mydb}i_db" |
272 |
|
273 |
if use mips |
274 |
then |
275 |
# this is needed because gcc 3.3-compiled kernels will hang |
276 |
# the machine trying to run this test - check with `Kumba |
277 |
# <rac@g.o> 2003.06.26 |
278 |
myconf -Dd_u32align |
279 |
fi |
280 |
|
281 |
if use debug |
282 |
then |
283 |
CFLAGS="${CFLAGS} -g" |
284 |
myconf -DDEBUGGING |
285 |
fi |
286 |
|
287 |
if use sparc |
288 |
then |
289 |
myconf -Ud_longdbl |
290 |
fi |
291 |
|
292 |
if use alpha && "$(tc-getCC)" == "ccc" |
293 |
then |
294 |
ewarn "Perl will not be built with berkdb support, use gcc if you needed it..." |
295 |
myconf -Ui_db -Ui_ndbm |
296 |
fi |
297 |
|
298 |
rm -f config.sh Policy.sh |
299 |
|
300 |
[[ -n "${ABI}" ]] && myconf "-Dusrinc=$(get_ml_incdir)" |
301 |
|
302 |
[[ ${ELIBC} == "FreeBSD" ]] && myconf "-Dlibc=/usr/$(get_libdir)/libc.a" |
303 |
|
304 |
if [[ $(get_libdir) != "lib" ]] ; then |
305 |
myconf "-Dlibpth=/usr/local/$(get_libdir) /$(get_libdir) /usr/$(get_libdir)" |
306 |
fi |
307 |
|
308 |
sh Configure -des \ |
309 |
-Darchname="${myarch}" \ |
310 |
-Dcccdlflags="-fPIC" \ |
311 |
-Dccdlflags="-rdynamic" \ |
312 |
-Dcc="$(tc-getCC)" \ |
313 |
-Dprefix="/usr" \ |
314 |
-Dvendorprefix="/usr" \ |
315 |
-Dsiteprefix="/usr" \ |
316 |
-Dlocincpth=" " \ |
317 |
-Doptimize="${CFLAGS}" \ |
318 |
-Duselargefiles \ |
319 |
-Duseshrplib \ |
320 |
-Dman3ext="3pm" \ |
321 |
-Dlibperl="${LIBPERL}" \ |
322 |
-Dd_dosuid \ |
323 |
-Dd_semctl_semun \ |
324 |
-Dcf_by="Gentoo" \ |
325 |
-Ud_csh \ |
326 |
"${myconf[@]}" || die "Unable to configure" |
327 |
|
328 |
emake -j1 -f Makefile depend || die "Couldn't make libperl$(get_libname) depends" |
329 |
emake -j1 -f Makefile LIBPERL=${LIBPERL} ${LIBPERL} || die "Unable to make libperl$(get_libname)" |
330 |
mv ${LIBPERL} "${WORKDIR}" |
331 |
} |
332 |
|
333 |
src_install() { |
334 |
|
335 |
export LC_ALL="C" |
336 |
|
337 |
if [ "${PN}" = "libperl" ] |
338 |
then |
339 |
dolib.so "${WORKDIR}"/${LIBPERL} |
340 |
dosym ${LIBPERL} /usr/$(get_libdir)/libperl$(get_libname ${PERLSLOT}) |
341 |
else |
342 |
# Need to do this, else apps do not link to dynamic version of |
343 |
# the library ... |
344 |
local coredir="/usr/$(get_libdir)/perl5/${PV}/${myarch}${mythreading}/CORE" |
345 |
dodir ${coredir} |
346 |
dosym ../../../../../$(get_libdir)/${LIBPERL} ${coredir}/${LIBPERL} |
347 |
dosym ../../../../../$(get_libdir)/${LIBPERL} ${coredir}/libperl$(get_libname ${PERLSLOT}) |
348 |
dosym ../../../../../$(get_libdir)/${LIBPERL} ${coredir}/libperl$(get_libname) |
349 |
|
350 |
# Fix for "stupid" modules and programs |
351 |
dodir /usr/$(get_libdir)/perl5/site_perl/${PV}/${myarch}${mythreading} |
352 |
|
353 |
make DESTDIR="${D}" \ |
354 |
INSTALLMAN1DIR="${D}/usr/share/man/man1" \ |
355 |
INSTALLMAN3DIR="${D}/usr/share/man/man3" \ |
356 |
install || die "Unable to make install" |
357 |
|
358 |
cp -f utils/h2ph utils/h2ph_patched |
359 |
|
360 |
LD_LIBRARY_PATH=. ./perl -Ilib utils/h2ph_patched \ |
361 |
-a -d "${D}"/usr/$(get_libdir)/perl5/${PV}/${myarch}${mythreading} <<EOF |
362 |
asm/termios.h |
363 |
syscall.h |
364 |
syslimits.h |
365 |
syslog.h |
366 |
sys/ioctl.h |
367 |
sys/socket.h |
368 |
sys/time.h |
369 |
wait.h |
370 |
EOF |
371 |
|
372 |
# This is to fix a missing c flag for backwards compat |
373 |
for i in `find "${D}"/usr/$(get_libdir)/perl5 -iname "Config.pm"`;do |
374 |
sed -e "s:ccflags=':ccflags='-DPERL5 :" \ |
375 |
-e "s:cppflags=':cppflags='-DPERL5 :" \ |
376 |
${i} > ${i}.new &&\ |
377 |
mv ${i}.new ${i} || die "Sed failed" |
378 |
done |
379 |
|
380 |
# A poor fix for the miniperl issues |
381 |
dosed 's:./miniperl:/usr/bin/perl:' /usr/$(get_libdir)/perl5/${PV}/ExtUtils/xsubpp |
382 |
fperms 0444 /usr/$(get_libdir)/perl5/${PV}/ExtUtils/xsubpp |
383 |
dosed 's:./miniperl:/usr/bin/perl:' /usr/bin/xsubpp |
384 |
fperms 0755 /usr/bin/xsubpp |
385 |
|
386 |
./perl installman \ |
387 |
--man1dir="${D}/usr/share/man/man1" --man1ext='1' \ |
388 |
--man3dir="${D}/usr/share/man/man3" --man3ext='3' |
389 |
|
390 |
# This removes ${D} from Config.pm and .packlist |
391 |
for i in `find "${D}" -iname "Config.pm"` `find "${D}" -iname ".packlist"`;do |
392 |
einfo "Removing ${D} from ${i}..." |
393 |
sed -e "s:${D}::" ${i} > "${i}.new" &&\ |
394 |
mv "${i}.new" "${i}" || die "Sed failed" |
395 |
done |
396 |
fi |
397 |
|
398 |
dodoc Changes* Artistic Copying README Todo* AUTHORS |
399 |
|
400 |
if [ "${PN}" = "perl" ] |
401 |
then |
402 |
# HTML Documentation |
403 |
# We expect errors, warnings, and such with the following. |
404 |
|
405 |
dodir /usr/share/doc/${PF}/html |
406 |
./perl installhtml \ |
407 |
--podroot='.' \ |
408 |
--podpath='lib:ext:pod:vms' \ |
409 |
--recurse \ |
410 |
--htmldir="${D}/usr/share/doc/${PF}/html" \ |
411 |
--libpods='perlfunc:perlguts:perlvar:perlrun:perlop' |
412 |
fi |
413 |
} |
414 |
|
415 |
pkg_postinst() { |
416 |
|
417 |
# Make sure we do not have stale/invalid libperl.so 's ... |
418 |
if [ -f "${ROOT}usr/$(get_libdir)/libperl$(get_libname)" -a ! -L "${ROOT}usr/$(get_libdir)/libperl$(get_libname)" ] |
419 |
then |
420 |
mv -f "${ROOT}usr/$(get_libdir)/libperl$(get_libname)" "${ROOT}usr/$(get_libdir)/libperl$(get_libname).old" |
421 |
fi |
422 |
|
423 |
# Next bit is to try and setup the /usr/lib/libperl.so symlink |
424 |
# properly ... |
425 |
local libnumber="`ls -1 "${ROOT}"usr/$(get_libdir)/libperl$(get_libname ?.*) | grep -v '\.old' | wc -l`" |
426 |
if [ "${libnumber}" -eq 1 ] |
427 |
then |
428 |
# Only this version of libperl is installed, so just link libperl.so |
429 |
# to the *soname* version of it ... |
430 |
ln -snf libperl$(get_libname ${PERLSLOT}) "${ROOT}"/usr/$(get_libdir)/libperl$(get_libname) |
431 |
else |
432 |
if [ -x "${ROOT}/usr/bin/perl" ] |
433 |
then |
434 |
# OK, we have more than one version .. first try to figure out |
435 |
# if there are already a perl installed, if so, link libperl.so |
436 |
# to that *soname* version of libperl.so ... |
437 |
local perlversion="`${ROOT}/usr/bin/perl -V:version | cut -d\' -f2 | cut -d. -f1,2`" |
438 |
|
439 |
cd "${ROOT}"/usr/$(get_libdir) |
440 |
# Link libperl.so to the *soname* versioned lib ... |
441 |
ln -snf `echo libperl$(get_libname ?.${perlversion}) | cut -d. -f1,2,3` libperl$(get_libname) |
442 |
else |
443 |
local x latest |
444 |
|
445 |
# Nope, we are not so lucky ... try to figure out what version |
446 |
# is the latest, and keep fingers crossed ... |
447 |
for x in `ls -1 "${ROOT}"/usr/$(get_libdir)/libperl$(get_libname ?.*)` |
448 |
do |
449 |
latest="${x}" |
450 |
done |
451 |
|
452 |
cd "${ROOT}"/usr/$(get_libdir) |
453 |
# Link libperl.so to the *soname* versioned lib ... |
454 |
ln -snf `echo ${latest##*/} | cut -d. -f1,2,3` libperl$(get_libname) |
455 |
fi |
456 |
fi |
457 |
} |
458 |
|
459 |
|
460 |
|
461 |
-- |
462 |
gentoo-commits@l.g.o mailing list |